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
I believe this is due to this check in the cancel method while (promise._isCancellable())
This check is in this cancel function Promise.prototype["break"] = Promise.prototype.cancel
When this check is made, the promise is always resolved so it's not cancellable.
The text was updated successfully, but these errors were encountered:
I do work with Alyx (ddubrow). When looking why the cancellation of a pull request does not work, I have the impression the (or one of) issue is the readNext function inside of _readData in src/adb/sync.ts
Not an expert in the special cancellation support of bluebird's Promise implementation, but when looking at the code:
It seems evident to me that the promise returned by the recursive invocation of readNext() is just ignored, hence does not get canceled (and also gets dropped, hence no error reporting, unhandled promise failures, or not?)
So maybe cancellation only works while receiving data for the first block, 65k? I do observe that calling cancel has no effect when calling it later on.
Could we fix this issue by a trivial cancel handling, by setting a flag when canceling, and then stop the recursion by not calling readNext() again?
I guess we could also try to cancel the current reader's promise directly, but for my use just stopping after a 65k block instead of never is a huge improvement.
I believe this is due to this check in the cancel method
while (promise._isCancellable())
This check is in this cancel function
Promise.prototype["break"] = Promise.prototype.cancel
When this check is made, the promise is always resolved so it's not cancellable.
The text was updated successfully, but these errors were encountered: