Background thread pools should register the ThreadPoolCOMListener on Windows
Categories
(Core :: XPCOM, task)
Tracking
()
People
(Reporter: bugzilla, Unassigned)
References
(Blocks 2 open bugs)
Details
Doing this makes it possible for us to properly call COM APIs on the background thread pool. It probably kinda sorta works right now under certain circumstances [1], but we should make this explicit.
We register that for SharedThreadPool
, but we should be doing this for the background thread pool as well.
I also think that we should move ThreadPoolCOMListener
to ipc/mscom
, since it's useful far above and beyond just media code.
[1] Once the first CoInitializeEx(nullptr, COINIT_MULTITHREADED)
call happens in a process, all threads that are not already CoInitializeEx
'd receive an implicit COM initialization. But if that call hasn't happened yet, then no threads receive that implicit initialization.
Comment 1•3 years ago
|
||
After bug 1707954, all background threads should be part of the implicit MTA without any additional work, since ProcessRuntime is initialised before anything else and it eagerly brings up the MTA. Also, ThreadPoolCOMListener is gone as of bug 1546154 part 6 anyway.
Description
•