io_service::strand.) Typedef for backwards compatibility.
typedef boost::asio::io_service::strand strand;
Request the strand to invoke the given handler.
Get the io_service associated with the strand.
Request the strand to invoke the given handler and return immediately.
Determine whether the strand is running in the current thread.
Create a new handler that automatically dispatches the wrapped handler on the strand.
io_service::strand class provides the ability
to post and dispatch handlers with the guarantee that none of those handlers
will execute concurrently.
ameeting completion handler requirements
a1which is an arbitrary copy of
amade by the implementation
bmeeting completion handler requirements
b1which is an arbitrary copy of
bmade by the implementation
if any of the following conditions are true:
s.dispatch(b), where the latter is performed outside the strand
s.post(b), where the former is performed outside the strand
s.dispatch(b), where both are performed outside the strand
Note that in the following case:
async_op_1(..., s.wrap(a)); async_op_2(..., s.wrap(b));
the completion of the first async operation will perform
and the second will perform
but the order in which those are performed is unspecified. That is, you cannot
state whether one happens-before the other. Therefore none of the above conditions
are met and no ordering guarantee is made.
The implementation makes no guarantee that handlers posted or dispatched
objects will be invoked concurrently.
Distinct objects: Safe.
Shared objects: Safe.