Support using microtask-style Then() callbacks for single-threaded MozPromise
Categories
(Core :: XPCOM, enhancement)
Tracking
()
People
(Reporter: nika, Unassigned)
References
Details
Reporter | ||
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Reporter | ||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Comment 10•5 years ago
|
||
If we still need this, I'd add end-of-task queue to nsThread. Tasks in it would get handled at the end of the normal task.
And if an end-of-task thingie adds more end-of-tasks, those would be handled asap (i.e. not waiting for another task to run). So basically modify current stable-state handling to become available on all the threads, and not be called stable-state to but end-of-task.
Whatever AbstractThread is doing could be hopefully implemented on top of that.
(But please, let's stop talking about microtasks and stable-state here, that is just confusing, since those are in the spec same scheduling and depend on js stack, which we don't want there.
We do want to get rid of random stable-state usage - that has already shown quite a few bugs when JS gets run when it shouldn't. And we should fix our stable-state to follow the spec.)
Updated•2 years ago
|
Description
•