- From: Zoltan Kis via GitHub <sysbot+gh@w3.org>
- Date: Tue, 03 Nov 2015 15:46:15 +0000
- To: public-web-nfc@w3.org
```CancellationToken``` seems to be an overkill for what we are trying the achieve here. Not even elegant any more (we wanted the change in order to get rid of a method). Now developers need to write half a page of code to replace a single function call. IMO in this case it is better to apply the specialized semantics of ```cancelPush()```, rather than a generalized semantics (with all the issues) of cancellable ```Promise```. I agree with @alexshalamov and ```javascript Promise<void> cancelPush(NFCPushTarget target = "any"); ``` works for me, although I am still on the opinion that it could also be a ```void cancelPush()```. We cannot guarantee cancellation (it is a race condition). We can only say that "we cancel if it's not too late for that". Eventually we can return "yes, we managed to cancel", or "sorry", but I am not sure about it. Anyway, if the Promise semantics can be ensured on all platforms, why not. -- GitHub Notif of comment by zolkis See https://github.com/w3c/web-nfc/issues/86#issuecomment-153394267
Received on Tuesday, 3 November 2015 15:46:16 UTC