Robert Katić

Results 10 comments of Robert Katić

@ForbesLindesay Sorry if I'm missing something obvious, but can you please explain why this API would be better then an `asap.flushSync`?

To be more clear, an `asap.flushSync` would do both: mark flushing, and do flushing. So it's not clear to me why it's necessary to have an API with "marking" and...

Or I'm still missing something obvious, or my question was not clear enough. Consider ``` javascript asap.flushSync = function() { flushing = true; flush(); }; ``` Why your first example...

On a second tough, I'm not sure marking is even necessary if we flush synchronously, since it's only used to avoid recursive `process.nextTick`. Hmm, I guess I am missing something...

Ok, I see your point now. With `asap.flushSync` you would flush without waiting next tick, but `process.nextTick` would still be called during flushing. Not sure that an extra `process.nextTick` on...

I gave a little more thought on this, and realized that the two function API is probably not adequate. If user throws between marking and flushing, the synchronous flushing will...

Knowing that host/native constructors have sometimes typeof equal to "object", in [P](https://github.com/rkatic/p/blob/5a75ebf5ded9c2ec926e332e482ae878d0506df6/p.js#L147) the check of existence of a constructor consists in `typeof x === "function || typeof y === "object"`....

As @AgentME already noted, this seems duplicate of #55.

We could always add an `asap.forceSyncThrow`. Finding a workaround for this issue could be difficult and unreliable. I'm willing to investigate more on this, but this month I will still...

https://github.com/spion/async-compare/pull/15