ecor
Loading...
Searching...
No Matches
ecor::stoppable_source Concept Reference

Concept for stoppable sources, requires that the type has get_token, stop_possible, stop_requested, and request_stop member functions with appropriate signatures, and that the token returned by get_token satisfies the stoppable_token concept. More...

#include <ecor.hpp>

Concept definition

template<class Source>
concept ecor::stoppable_source = requires( Source& src, Source const csrc ) {
{ csrc.get_token() } -> stoppable_token;
{ csrc.stop_possible() } noexcept -> std::same_as< bool >;
{ csrc.stop_requested() } noexcept -> std::same_as< bool >;
{ src.request_stop() } -> std::same_as< bool >;
}
Concept for stoppable sources, requires that the type has get_token, stop_possible,...
Definition: ecor.hpp:1303
Concept for stoppable tokens, requires that the type has stop_requested and stop_possible member func...
Definition: ecor.hpp:1285

Detailed Description

Concept for stoppable sources, requires that the type has get_token, stop_possible, stop_requested, and request_stop member functions with appropriate signatures, and that the token returned by get_token satisfies the stoppable_token concept.

Stop source provides stop_tokens and the source is used to signal that stop was requested.