Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the develop branch, built from commit adcd4c09f0.
PrevUpHomeNext

strand::prefer

Forward a preference to the underlying executor.

template<
    typename Property>
constraint_t< can_prefer< const Executor &, Property >::value &&!is_convertible< Property, execution::blocking_t::always_t >::value, strand< decay_t< prefer_result_t< const Executor &, Property > > > > prefer(
    const Property & p) const;

Do not call this function directly. It is intended for use with the prefer customisation point.

For example:

boost::asio::strand<my_executor_type> ex1 = ...;
auto ex2 = boost::asio::prefer(ex1,
    boost::asio::execution::blocking.never);

PrevUpHomeNext