asio C++ library

PrevUpHomeNext

strand::query

Forward a query to the underlying executor.

template<
    typename Property>
constraint_t< can_query< const Executor &, Property >::value, conditional_t< is_convertible< Property, execution::blocking_t >::value, execution::blocking_t, query_result_t< const Executor &, Property > > > query(
    const Property & p) const;

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

For example:

asio::strand<my_executor_type> ex = ...;
if (asio::query(ex, asio::execution::blocking)
      == asio::execution::blocking.never)
  ...

PrevUpHomeNext