зеркало из https://github.com/mozilla/gecko-dev.git
5a3128b973
It's fairly common for clients to hold a pointer to some private thread and then inquire about `IsOnCurrentThread` in debug checks. As we migrate these private threads into some `nsIEventTarget` implementation that might be running on thread pools, we need to ensure that those `IsOnCurrentThread` continues to be relatively cheap. The current implementation for thread pools is not particularly efficient. The inefficiency comes from having to iterate over all the threads in the pool. But there's no need to do this; we can just have each thread set a particular thread-local variable to the thread pool it's running on, and check the value of that thread-local variable instead. Differential Revision: https://phabricator.services.mozilla.com/D47139 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
base | ||
build | ||
components | ||
doc | ||
ds | ||
glue | ||
idl-parser | ||
io | ||
libxpt/xptcall | ||
reflect | ||
rust | ||
string | ||
system | ||
tests | ||
threads | ||
windbgdlg | ||
xpidl | ||
moz.build | ||
xpcom-config.h.in | ||
xpcom-private.h.in |