-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cancelPush() should have target ? #54
Comments
I think it is fine that it cancels everything for now. Cancelable Promises are on their way and we would want to migrate to using that when that happens (unless that is way in the future). |
Until cancellable Promises come, we should add a target to cancelPush(). This would also be in line with having 2 separate timers, outboxes, and instances of the algo allowed. |
Working on it now. |
Please add a NOTE about this probably going away in the future |
btw, some experimentation from domenic https://github.com/domenic/cancelable-promise/blob/master/test/cancelable-promise.js |
#50 fixes this. |
At any moment, there can be a maximum of 2 pushMessage() for an adapter, 1 for tag, 1 for peer.
So correspondingly 2 messageBuffer/NFCMessage, 2 timers, etc.
Presently in cancelPush(), all the instances of pushMessage() are invalidated.
Do you want to add "target" as a parameter to cancelPush() ?
The text was updated successfully, but these errors were encountered: