A type-erased execution context.
More...
#include <AnyStrand.hpp>
|
template<NotSameAs< AnyStrand > StrandType> |
| AnyStrand (StrandType &&strand) |
| Construct a new Any Strand object.
|
|
| AnyStrand (AnyStrand const &)=default |
|
| AnyStrand (AnyStrand &&)=default |
|
auto | execute (SomeHandlerWithoutStopToken auto &&fn) |
| Execute a function without a stop token on the strand.
|
|
auto | execute (SomeHandlerWith< AnyStopToken > auto &&fn) |
| Execute a function taking a stop token on the strand.
|
|
auto | execute (SomeHandlerWith< AnyStopToken > auto &&fn, SomeStdDuration auto timeout) |
| Execute a function taking a stop token on the strand with a timeout.
|
|
A type-erased execution context.
◆ AnyStrand()
util::async::AnyStrand::AnyStrand |
( |
StrandType && | strand | ) |
|
|
inline |
Construct a new Any Strand object.
- Template Parameters
-
StrandType | The type of the strand to wrap |
- Parameters
-
◆ execute() [1/3]
auto util::async::AnyStrand::execute |
( |
SomeHandlerWith< AnyStopToken > auto && | fn | ) |
|
|
inlinenodiscard |
Execute a function taking a stop token on the strand.
- Parameters
-
fn | The function to execute |
- Returns
- The type-erased operation
◆ execute() [2/3]
auto util::async::AnyStrand::execute |
( |
SomeHandlerWith< AnyStopToken > auto && | fn, |
|
|
SomeStdDuration auto | timeout ) |
|
inlinenodiscard |
Execute a function taking a stop token on the strand with a timeout.
- Parameters
-
fn | The function to execute |
timeout | The timeout for the function |
- Returns
- The type-erased operation
◆ execute() [3/3]
auto util::async::AnyStrand::execute |
( |
SomeHandlerWithoutStopToken auto && | fn | ) |
|
|
inlinenodiscard |
Execute a function without a stop token on the strand.
- Parameters
-
fn | The function to execute |
- Returns
- The type-erased operation
The documentation for this class was generated from the following file: