Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

trampoline

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
Types

Name

Description

inner_executor_type

The type of the underlying executor.

Member Functions

Name

Description

context

Obtain the underlying execution context.

defer

Request the executor to invoke the given function object.

dispatch

Request the executor to invoke the given function object.

execute

Request the executor to invoke the given function object.

get_inner_executor

Obtain the underlying executor.

max_inline_depth

Obtain the deepest a blocking.possibly execute() made from inside this trampoline's own frame may run immediately rather than queue.

max_trampolined_calls

Obtain the number of calls that may be queued to a trampoline this executor installs.

on_work_finished

Inform the executor that some work is no longer outstanding.

on_work_started

Inform the executor that it has some outstanding work.

operator=

Assignment operator.
—
Converting assignment operator.
—
Move assignment operator.
—
Converting move assignment operator.

post

Request the executor to invoke the given function object.

prefer

Forward a preference to the underlying executor.

query

Forward a query to the underlying executor.

query [static]

Query the current value of the blocking property.
—
Query the current value of the relationship property.
—
Query the current value of the inline_exception_handling property.

require

Obtain an executor with the blocking.possibly property.
—
Obtain an executor with the blocking.never property.
—
Obtain an executor with the inline_exception_handling.propagate property.
—
Obtain an executor with the inline_exception_handling.terminate property.
—
Forward a requirement to the underlying executor.
—

running_in_this_thread

Determine whether a trampoline with this executor's identity is running in the current thread.

trampoline [constructor]

Default constructor.
—
Construct an executor for the specified target executor.
—
Copy constructor.
—
Converting copy constructor.
—
Move constructor.
—
Converting move constructor.

~trampoline [destructor]

Destructor.

Friends

Name

Description

operator!=

Compare two executors for inequality.

operator==

Compare two executors for equality.

The trampoline class template adapts an existing executor such that:

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.

Requirements

Header: boost/asio/trampoline.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext