]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/coroutine2/doc/overview.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / coroutine2 / doc / overview.qbk
CommitLineData
7c673cae
FG
1[/
2 Copyright Oliver Kowalke 2014.
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt
6]
7
8[section:overview Overview]
9
10__boost_coroutine__ provides templates for generalized subroutines which allow
11suspending and resuming execution at certain locations.
12It preserves the local state of execution and allows re-entering subroutines more
13than once (useful if state must be kept across function calls).
14
15Coroutines can be viewed as a language-level construct providing a special kind
16of control flow.
17
18In contrast to threads, which are pre-emptive, __coro__ switches are
19cooperative (programmer controls when a switch will happen). The kernel is not
20involved in the coroutine switches.
21
22The implementation uses __boost_context__ for context switching.
23
24In order to use the classes and functions described here, you can either include
25the specific headers specified by the descriptions of each class or function, or
26include the master library header:
27
28 #include <boost/coroutine2/all.hpp>
29
30which includes all the other headers in turn.
31
32All functions and classes are contained in the namespace __coro_ns__.
33
34[note This library requires C++11!]
35
36[endsect]