namespace
transformsThe namespace transforms declares callable objects that transform any continuable_
Contents
- Reference
Transforms can be applied to continuables through using the cti::
Functions
- auto to_future() -> auto
- Returns a transform that if applied to a continuable, it will start the continuation chain and returns the asynchronous result as
std::future<...>
. - auto wait() -> auto
- Returns a transform that if applied to a continuable, it will start the continuation chain and returns the result synchronously. The current thread is blocked until the continuation chain is finished.
-
template<typename Rep, typename Period>auto wait_for(std::chrono::duration<Rep, Period> duration) -> auto
- Returns a transform that if applied to a continuable, it will start the continuation chain and returns the result synchronously. The current thread is blocked until the continuation chain is finished.
-
template<typename Clock, typename Duration>auto wait_until(std::chrono::time_point<Clock, Duration> time_point) -> auto
- Returns a transform that if applied to a continuable, it will start the continuation chain and returns the result synchronously. The current thread is blocked until the continuation chain is finished.
Function documentation
auto cti:: transforms:: to_future()
Returns a transform that if applied to a continuable, it will start the continuation chain and returns the asynchronous result as std::future<...>
.
Returns | Returns a
|
---|
auto cti:: transforms:: wait()
Returns a transform that if applied to a continuable, it will start the continuation chain and returns the result synchronously. The current thread is blocked until the continuation chain is finished.
Returns | Returns a value that is available immediately. The signature of the future depends on the result type:
|
||||||||
---|---|---|---|---|---|---|---|---|---|
Exceptions | |||||||||
wait_transform_canceled_exception | if the awaited continuable_ |
template<typename Rep, typename Period>
auto cti:: transforms:: wait_for(std::chrono::duration<Rep, Period> duration)
Returns a transform that if applied to a continuable, it will start the continuation chain and returns the result synchronously. The current thread is blocked until the continuation chain is finished.
Returns | Returns a result that is available immediately. The signature of the future depends on the result type:
|
---|
template<typename Clock, typename Duration>
auto cti:: transforms:: wait_until(std::chrono::time_point<Clock, Duration> time_point)
Returns a transform that if applied to a continuable, it will start the continuation chain and returns the result synchronously. The current thread is blocked until the continuation chain is finished.
Returns | Returns a result that is available immediately. The signature of the future depends on the result type:
|
---|