summaryrefslogtreecommitdiffstats
path: root/third_party/rust/tokio-executor/README.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /third_party/rust/tokio-executor/README.md
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/tokio-executor/README.md')
-rw-r--r--third_party/rust/tokio-executor/README.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/third_party/rust/tokio-executor/README.md b/third_party/rust/tokio-executor/README.md
new file mode 100644
index 0000000000..1a996107aa
--- /dev/null
+++ b/third_party/rust/tokio-executor/README.md
@@ -0,0 +1,47 @@
+# tokio-executor
+
+Task execution related traits and utilities.
+
+[Documentation](https://docs.rs/tokio-executor/0.1.9/tokio_executor)
+
+## Overview
+
+In the Tokio execution model, futures are lazy. When a future is created, no
+work is performed. In order for the work defined by the future to happen, the
+future must be submitted to an executor. A future that is submitted to an
+executor is called a "task".
+
+The executor is responsible for ensuring that [`Future::poll`] is called
+whenever the task is [notified]. Notification happens when the internal state of
+a task transitions from "not ready" to ready. For example, a socket might have
+received data and a call to `read` will now be able to succeed.
+
+This crate provides traits and utilities that are necessary for building an
+executor, including:
+
+* The [`Executor`] trait describes the API for spawning a future onto an
+ executor.
+
+* [`enter`] marks that the current thread is entering an execution
+ context. This prevents a second executor from accidentally starting from
+ within the context of one that is already running.
+
+* [`DefaultExecutor`] spawns tasks onto the default executor for the current
+ context.
+
+* [`Park`] abstracts over blocking and unblocking the current thread.
+
+[`Executor`]: https://docs.rs/tokio-executor/0.1.9/tokio_executor/trait.Executor.html
+[`enter`]: https://docs.rs/tokio-executor/0.1.9/tokio_executor/fn.enter.html
+[`DefaultExecutor`]: https://docs.rs/tokio-executor/0.1.9/tokio_executor/struct.DefaultExecutor.html
+[`Park`]: https://docs.rs/tokio-executor/0.1.9/tokio_executor/park/trait.Park.html
+
+## License
+
+This project is licensed under the [MIT license](LICENSE).
+
+### Contribution
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in Tokio by you, shall be licensed as MIT, without any additional
+terms or conditions.