зеркало из https://github.com/mozilla/gecko-dev.git
3e323b7d7a
This patch contains changes to moz_task to improve it's support for async execution on multiple threads. Unlike the previous executor implementation, this new implementation reduces the amount of unsafe code substantially by depending on the async-task crate (https://crates.io/crates/async-task) for the core task implementation. This adds a few additional features: * Both local (no Send bound) and non-local (with Send bound) execution support, * Support for spawning on arbitrary nsIEventTargets or the background task pool, * Returned Task objects from runnables which may be .await-ed on or detach()-ed, * Support for spawning with the NS_DISPATCH_EVENT_MAY_BLOCK flag set, * Automatic use of NS_DISPATCH_AT_END when required, * Support for specifying the runnable priority for runnables. There are also some correctness improvements, and exposed a better API for dispatching normal runnable functions to background threads. After these changes the TaskRunnable API should no longer be necessary. It is re-implemented on top of the executor and kept in-place to avoid rewriting all consumers. Differential Revision: https://phabricator.services.mozilla.com/D130705 |
||
---|---|---|
.. | ||
new | ||
old | ||
src | ||
tests | ||
Cargo.toml | ||
XULStore.cpp | ||
XULStore.h | ||
components.conf | ||
moz.build | ||
nsIXULStore.idl |