trav90
acf8008679
Add some new methods to AbstractThread
...
These are easier to use and more consistent with the semantics of AbstractThread::Dispatch.
2018-07-25 07:11:48 +08:00
trav90
4a837c3711
Remove AbstractThread::InTailDispatch
...
This is unused and unnecessary now that we pass this explicitly during dispatch.
2018-07-25 06:57:58 +08:00
trav90
dfc7504069
Remove MaybeTailDispatch
...
This is now the default behavior.
2018-07-25 06:57:53 +08:00
trav90
78e189b54a
Do tail dispatch automatically
2018-07-25 06:57:52 +08:00
trav90
a3d351f76a
Adjust tail dispatching assertions
2018-07-25 06:57:50 +08:00
trav90
b6bb9afb37
Move the GetCurrent TLS logic into AbstractThread
2018-07-25 06:57:47 +08:00
trav90
c20e81736f
Remove the concept of forced dispatch
...
This was originally added to make MediaPromise dispatch reliable in the
presence of the Flush() feature of MediaTaskQueue. That feature has
now been restricted to a special subclass (which we should eventually eliminate),
so we can just assert that MediaPromises are never used on those task queues
and simplify the rest of the code.
2018-07-25 06:56:58 +08:00
trav90
834def9678
Move dispatch failure handling into dispatch itself
...
This is nicer than scattering the failure handling to each callsite.
2018-07-25 06:56:56 +08:00
trav90
70322d85c2
Detemplatize nsIThread wrapper and move it into AbstractThread.cpp
2018-07-25 06:56:54 +08:00
trav90
c8a958e5c7
Remove AbstractThread::Create
...
Atomicy would be broken if we accidentally had 2 AbstractThread instances associated with the same nsIThread (such as the main thread).
2018-07-25 06:56:16 +08:00
trav90
87a4cf6376
Use TailDispatch for the MDSM's task queue
2018-07-25 06:55:39 +08:00
trav90
3090135f8e
Do static initialization explicitly
2018-07-25 06:55:27 +08:00
trav90
702d802110
Add a convenience/efficiently routine to get an AbstractThread for the main thread
2018-07-25 06:52:23 +08:00
trav90
4e69a065ee
Implement AbstractThread
...
AbstractThread is a simplification of the existing MediaPromise code that guarantees that two events will not run at the same time - either because it's a single thread or because it's a task queue.
2018-07-25 06:51:34 +08:00