![]() |
Home | Libraries | People | FAQ | More |
Performs trampoline execution within the adapted executor, establishing the trampoline from inside that executor's own execution.
template< typename Executor, typename Blocking = execution::blocking_t::possibly_t, typename InlineExceptionHandling = execution::inline_exception_handling_t::propagate_t> class trampoline
|
Name |
Description |
|---|---|
|
The type of the underlying executor. |
|
Name |
Description |
|---|---|
|
Obtain the underlying execution context. |
|
|
Request the executor to invoke the given function object. |
|
|
Request the executor to invoke the given function object. |
|
|
Request the executor to invoke the given function object. |
|
|
Obtain the underlying executor. |
|
|
Obtain the deepest a blocking.possibly execute() made from inside this trampoline's own frame may run immediately rather than queue. |
|
|
Obtain the number of calls that may be queued to a trampoline this executor installs. |
|
|
Inform the executor that some work is no longer outstanding. |
|
|
Inform the executor that it has some outstanding work. |
|
|
Assignment operator. |
|
|
Request the executor to invoke the given function object. |
|
|
Forward a preference to the underlying executor. |
|
|
Forward a query to the underlying executor. |
|
|
query [static] |
Query the current value of the blocking property. |
|
Obtain an executor with the blocking.possibly property. |
|
|
Determine whether a trampoline with this executor's identity is running in the current thread. |
|
|
trampoline [constructor] |
Default constructor. |
|
~trampoline [destructor] |
Destructor. |
|
Name |
Description |
|---|---|
|
Compare two executors for inequality. |
|
|
Compare two executors for equality. |
The trampoline class template
adapts an existing executor such that:
blocking
property is set to blocking.never)
are submitted to the target executor, unless a trampoline with this executor's
identity and with sufficient capacity is already installed on the current
thread, in which case they are queued on it.
blocking
is blocking.possibly) are submitted to the target
executor if there is already a trampoline with this executor's identity
on the current thread, but it has already reached its maximum number
of calls. If there is such a trampoline with sufficient capacity, the
function object is queued to it. Otherwise the target executor is given
a wrapper that installs a new trampoline, and the function object runs
within it.
A trampoline's identity is assigned once, when it is constructed directly
or via make_trampoline().
This identity is carried through copies, conversions and require/prefer results.
The identity is used to determine whether a submitted function object is
permitted to join an already-installed trampoline.
Header: boost/asio/trampoline.hpp
Convenience header: boost/asio.hpp