Benjamin Gruenbaum
Benjamin Gruenbaum
> Is there a reason you couldn't add it to your build separately? Same reason ESLint (which is also standalone) has a webpack plugin basically: you want to re-run it...
Well, there is no event emitter on a standards track at the moment. I propose we use an observable for it since it's on standards track: ``` js function timer(handler,...
> Promise won't do for observable cases, or cases where someone wants to use this in something like a CSP library using generators, because it's only async. It works in...
I think the third state document is important, I'm writing a lot of cancellation aware code in C# and cancellation-as-exceptions is quite the annoyance for me.
@Kulvar this is a 2016 issue, cancel tokens are dead, third state is dead, we might revive them for Node (and the web platform has AbortController). Sorry.
C# does what @dtribble is proposing. The major reason IMO the revealing constructor pattern makes sense for cancellation is synchronous `throw`s in the function the promise constructor is aiming to...
Yes, sorry you are right. The reason it made sense for promises is because it protects against Zalgo in that consumers of promises produced with the constructor don't have to...
@domenic a cancellation token/ cancellation token source pair is like a promise/deferred pair in this regard. In early writings (like some of @eright's) I recall using something a little similar...
Note that this isn't useful only for observables - promise APIs, async iterators DOM and Node events are all potential beneficiaries of this. One way is easy (registering for a...
Note that a C# cancellation token is a value type. Assuming that's too much work and ES value types are not even a thing anymore from what I understand -...