You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given Reader.read() is an asynchronous effect, it should be able to be canceled. The native FileReader has an abort() method, however this is not directly exposed.
Luckily JavaScript doesn't have a private methods/encapsulation; I've not tested yet, but I'll try Reader._getFileReader().abort().
The text was updated successfully, but these errors were encountered:
tryAbort() that catches the uncancelable effect as a success? Or expose it and let the user do the catching? This library API is currently lacking without cancel/abort as it doesn't fit a Future or Aff (or other names) interface for asynchronous effects. Fluture is one JavaScript implementation of said specs.
This has been one of the criticisms of the Promise API and AbortControllers have been bolted on to deal with this issue in hindsight. It helps consumers when APIs are fleshed out with the ability to abort/cancel an asynchronous task.
Given
Reader.read()
is an asynchronous effect, it should be able to be canceled. The native FileReader has an abort() method, however this is not directly exposed.Luckily JavaScript doesn't have a private methods/encapsulation; I've not tested yet, but I'll try
Reader._getFileReader().abort()
.The text was updated successfully, but these errors were encountered: