Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

basic_concurrent_channel::try_send_via_dispatch

Try to send a message without blocking, using dispatch semantics to call the receive operation's completion handler.

template<
    typename... Args>
bool try_send_via_dispatch(
    Args &&... args);

Fails if the buffer is full and there are no waiting receive operations.

The receive operation's completion handler may be called from inside this function.

For a channel with more than one signature, the message is constructed using the first signature, in order, whose parameters can be initialised from the supplied arguments. The arguments are not moved from unless the send succeeds.

Return Value

true on success, false on failure.


PrevUpHomeNext