aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/boost/context/README.md
diff options
context:
space:
mode:
authorbugaevskiy <bugaevskiy@yandex-team.com>2022-09-09 06:19:42 +0300
committerbugaevskiy <bugaevskiy@yandex-team.com>2022-09-09 06:19:42 +0300
commit3a9a5a35b061c4dcf40f8eda7b2c367cbf407fb9 (patch)
treee0ea790ff6266595236618eaf4ac90996a7ef2b0 /contrib/restricted/boost/context/README.md
parentcd6fa7264545efa04c71c5a4ea2ed2e3701a2f3d (diff)
downloadydb-3a9a5a35b061c4dcf40f8eda7b2c367cbf407fb9.tar.gz
Reimport boost/ublas as a separate project
Diffstat (limited to 'contrib/restricted/boost/context/README.md')
-rw-r--r--contrib/restricted/boost/context/README.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/restricted/boost/context/README.md b/contrib/restricted/boost/context/README.md
new file mode 100644
index 0000000000..5149b498b9
--- /dev/null
+++ b/contrib/restricted/boost/context/README.md
@@ -0,0 +1,21 @@
+boost.context
+=============
+
+boost.context is a foundational library that provides a sort of cooperative multitasking on a single thread.
+By providing an abstraction of the current execution state in the current thread, including the stack (with
+local variables) and stack pointer, all registers and CPU flags, and the instruction pointer, a execution_context
+instance represents a specific point in the application's execution path. This is useful for building
+higher-level abstractions, like coroutines, cooperative threads (userland threads) or an equivalent to
+C# keyword yield in C++.
+
+A execution_context provides the means to suspend the current execution path and to transfer execution control,
+thereby permitting another execution_context to run on the current thread. This state full transfer mechanism
+enables a execution_context to suspend execution from within nested functions and, later, to resume from where it
+was suspended. While the execution path represented by a execution_context only runs on a single thread, it can be
+migrated to another thread at any given time.
+
+A context switch between threads requires system calls (involving the OS kernel), which can cost more than
+thousand CPU cycles on x86 CPUs. By contrast, transferring control among them requires only fewer than
+hundred CPU cycles because it does not involve system calls as it is done within a single thread.
+
+boost.context requires C++11!