YACLib
C++ library for concurrent tasks execution
|
Namespaces | |
namespace | detail |
namespace | fault |
namespace | fiber |
Classes | |
class | FairThreadPool |
TODO(kononovk) Doxygen docs. More... | |
class | Future |
Provides a mechanism to access the result of async operations. More... | |
class | FutureBase |
Provides a mechanism to access the result of async operations. More... | |
class | FutureOn |
Provides a mechanism to access the result of async operations. More... | |
class | IExecutor |
class | IFunc |
Callable interface. More... | |
class | IntrusivePtr |
A intrusive pointer to objects with an embedded reference count. More... | |
class | IRef |
Reference counting interface. More... | |
class | Job |
Callable that can be executed in an IExecutor. More... | |
class | ManualExecutor |
TODO(mkornaukhov03) Doxygen. More... | |
class | Mutex |
Mutex for coroutines. More... | |
struct | NoRefTag |
class | OneShotEvent |
This class useful to wait or co_await some event. More... | |
class | Promise |
class | Result |
Encapsulated return value from caller. More... | |
struct | ResultEmpty |
class | ResultError |
class | SharedFuture |
class | SharedFutureBase |
class | SharedFutureOn |
class | SharedGuard |
class | SharedMutex |
SharedMutex for coroutines. More... | |
class | SharedPromise |
class | StickyGuard |
struct | StopError |
Default error. More... | |
class | Strand |
class | Task |
Provides a mechanism to schedule the some async operations TODO(MBkkt) add description. More... | |
class | UniqueGuard |
class | WaitGroup |
An object that allows you to Add some amount of async operations and then Wait for it to be Done. More... | |
Enumerations | |
enum class | FailPolicy : unsigned char { None = 0 , FirstFail = 1 , LastFail = 2 } |
This Policy describe how algorithm interpret if Future will be fulfilled by fail (exception or error) More... | |
enum class | OrderPolicy : unsigned char { Fifo = 0 , Same = 1 } |
This Policy describe how algorithm produce result. More... | |
enum class | ResultState : unsigned char { Value = 0 , Exception = 1 , Error = 2 , Empty = 3 } |
Functions | |
template<typename V , typename E > | |
void | Connect (FutureBase< V, E > &&f, Promise< V, E > &&p) |
template<typename V , typename E > | |
void | Connect (const SharedFutureBase< V, E > &f, Promise< V, E > &&p) |
template<typename V , typename E > | |
void | Connect (FutureBase< V, E > &&f, SharedPromise< V, E > &&p) |
template<typename V , typename E > | |
void | Connect (const SharedFutureBase< V, E > &f, SharedPromise< V, E > &&p) |
template<typename V , typename E > | |
void | Connect (SharedPromise< V, E > &primary, Promise< V, E > &&subsumed) |
template<typename V , typename E > | |
void | Connect (SharedPromise< V, E > &primary, SharedPromise< V, E > &&subsumed) |
template<typename V = void, typename E = StopError> | |
Contract< V, E > | MakeContract () |
Creates related future and promise. | |
template<typename V = void, typename E = StopError> | |
ContractOn< V, E > | MakeContractOn (IExecutor &e) |
template<typename V = Unit, typename E = StopError, typename... Args> | |
auto | MakeFuture (Args &&... args) |
Function for create Ready Future. | |
template<typename E = StopError, typename Func > | |
auto | Run (Func &&f) |
Execute Callable func on Inline executor. | |
template<typename E = StopError, typename Func > | |
auto | RunShared (Func &&f) |
template<typename E = StopError, typename Func > | |
auto | Run (IExecutor &e, Func &&f) |
Execute Callable func on executor. | |
template<typename E = StopError, typename Func > | |
auto | RunShared (IExecutor &e, Func &&f) |
template<typename V = void, typename E = StopError, typename Func > | |
auto | AsyncContract (Func &&f) |
Execute Callable func on Inline executor. | |
template<typename V = void, typename E = StopError, typename Func > | |
auto | AsyncSharedContract (Func &&f) |
template<typename V = void, typename E = StopError, typename Func > | |
auto | AsyncContract (IExecutor &e, Func &&f) |
Execute Callable func on executor. | |
template<typename V = void, typename E = StopError, typename Func > | |
auto | AsyncSharedContract (IExecutor &e, Func &&f) |
template<typename V , typename E > | |
Future< V, E > | Share (const SharedFutureBase< V, E > &future) |
template<typename V , typename E > | |
FutureOn< V, E > | Share (const SharedFutureBase< V, E > &future, IExecutor &executor) |
template<typename V , typename E > | |
Future< V, E > | Share (SharedPromise< V, E > &promise) |
template<typename V , typename E > | |
FutureOn< V, E > | Share (SharedPromise< V, E > &promise, IExecutor &executor) |
template<typename V = void, typename E = StopError> | |
SharedContract< V, E > | MakeSharedContract () |
template<typename V = void, typename E = StopError> | |
SharedContract< V, E > | MakeSharedContractOn (IExecutor &e) |
template<typename V = void, typename E = StopError> | |
SharedPromise< V, E > | MakeSharedPromise () |
template<typename V , typename E > | |
SharedFuture< V, E > | Split (FutureBase< V, E > &&future) |
template<typename V , typename E > | |
SharedFuture< V, E > | Split (SharedPromise< V, E > &promise) |
template<typename Event = detail::DefaultEvent, typename... Waited> | |
YACLIB_INLINE std::enable_if_t<(... &&is_waitable_v< Waited >), void > | Wait (Waited &... fs) noexcept |
Wait until Ready becomes true. | |
template<typename Event = detail::DefaultEvent, typename It > | |
YACLIB_INLINE std::enable_if_t< is_waitable_v< typename std::iterator_traits< It >::reference >, void > | Wait (It begin, It end) noexcept |
Wait until Ready becomes true. | |
template<typename Event = detail::DefaultEvent, typename It > | |
YACLIB_INLINE std::enable_if_t< is_waitable_v< typename std::iterator_traits< It >::reference >, void > | Wait (It begin, std::size_t count) noexcept |
Wait until Ready becomes true. | |
template<typename Event = detail::MutexEvent, typename Rep , typename Period , typename... Waited> | |
YACLIB_INLINE std::enable_if_t<(... &&is_waitable_with_timeout_v< Waited >), bool > | WaitFor (const std::chrono::duration< Rep, Period > &timeout_duration, Waited &... fs) noexcept |
Wait until the specified timeout duration has elapsed or Ready becomes true. | |
template<typename Event = detail::MutexEvent, typename Rep , typename Period , typename Iterator > | |
YACLIB_INLINE std::enable_if_t< is_waitable_with_timeout_v< typename std::iterator_traits< Iterator >::reference >, bool > | WaitFor (const std::chrono::duration< Rep, Period > &timeout_duration, Iterator begin, Iterator end) noexcept |
Wait until the specified timeout duration has elapsed or Ready becomes true. | |
template<typename Event = detail::MutexEvent, typename Rep , typename Period , typename Iterator > | |
YACLIB_INLINE std::enable_if_t< is_waitable_with_timeout_v< typename std::iterator_traits< Iterator >::reference >, bool > | WaitFor (const std::chrono::duration< Rep, Period > &timeout_duration, Iterator begin, std::size_t count) noexcept |
Wait until the specified timeout duration has elapsed or Ready becomes true. | |
template<typename Event = detail::MutexEvent, typename Clock , typename Duration , typename... Waited> | |
YACLIB_INLINE std::enable_if_t<(... &&is_waitable_with_timeout_v< Waited >), bool > | WaitUntil (const std::chrono::time_point< Clock, Duration > &timeout_time, Waited &... fs) noexcept |
Wait until specified time has been reached or Ready becomes true. | |
template<typename Event = detail::MutexEvent, typename Clock , typename Duration , typename Iterator > | |
YACLIB_INLINE std::enable_if_t< is_waitable_with_timeout_v< typename std::iterator_traits< Iterator >::reference >, bool > | WaitUntil (const std::chrono::time_point< Clock, Duration > &timeout_time, Iterator begin, Iterator end) noexcept |
Wait until specified time has been reached or Ready becomes true. | |
template<typename Event = detail::MutexEvent, typename Clock , typename Duration , typename Iterator > | |
YACLIB_INLINE std::enable_if_t< is_waitable_with_timeout_v< typename std::iterator_traits< Iterator >::reference >, bool > | WaitUntil (const std::chrono::time_point< Clock, Duration > &timeout_time, Iterator begin, std::size_t count) noexcept |
Wait until specified time has been reached or Ready becomes true. | |
template<FailPolicy F = FailPolicy::FirstFail, OrderPolicy O = OrderPolicy::Fifo, typename It , typename T = typename std::iterator_traits<It>::value_type> | |
auto | WhenAll (It begin, std::size_t count) |
Create Future which will be ready when all futures are ready. | |
template<FailPolicy F = FailPolicy::FirstFail, OrderPolicy O = OrderPolicy::Fifo, typename It , typename T = typename std::iterator_traits<It>::value_type> | |
YACLIB_INLINE auto | WhenAll (It begin, It end) |
Create Future which will be ready when all futures are ready. | |
template<FailPolicy F = FailPolicy::FirstFail, OrderPolicy O = OrderPolicy::Fifo, typename V , typename... E> | |
auto | WhenAll (FutureBase< V, E > &&... futures) |
Create Future which will be ready when all futures are ready. | |
template<FailPolicy P = FailPolicy::LastFail, typename It , typename T = typename std::iterator_traits<It>::value_type> | |
auto | WhenAny (It begin, std::size_t count) |
Create Future that is ready when any of futures is ready. | |
template<FailPolicy P = FailPolicy::LastFail, typename It , typename T = typename std::iterator_traits<It>::value_type> | |
YACLIB_INLINE auto | WhenAny (It begin, It end) |
Create Future that is ready when any of futures is ready. | |
template<FailPolicy P = FailPolicy::LastFail, typename V , typename... E> | |
auto | WhenAny (FutureBase< V, E > &&... futures) |
Create Future that is ready when any of futures is ready. | |
template<typename V , typename E > | |
YACLIB_INLINE auto | Await (Task< V, E > &task) noexcept |
template<typename Waited , typename = std::enable_if_t<is_waitable_v<Waited>>> | |
YACLIB_INLINE auto | Await (Waited &waited) noexcept |
template<typename... Waited, typename = std::enable_if_t<(... && is_waitable_v<Waited>)>> | |
YACLIB_INLINE auto | Await (Waited &... waited) noexcept |
template<typename Iterator , typename Value = typename std::iterator_traits<Iterator>::value_type, typename = std::enable_if_t<is_waitable_v<Value>>> | |
YACLIB_INLINE auto | Await (Iterator begin, std::size_t count) noexcept |
template<typename Iterator , typename = std::enable_if_t<is_waitable_v<typename std::iterator_traits<Iterator>::value_type>>> | |
YACLIB_INLINE auto | Await (Iterator begin, Iterator end) noexcept |
template<typename V , typename E > | |
YACLIB_INLINE auto | operator co_await (FutureBase< V, E > &&future) noexcept |
template<typename V , typename E > | |
YACLIB_INLINE auto | operator co_await (const SharedFutureBase< V, E > &future) noexcept |
template<typename V , typename E > | |
YACLIB_INLINE auto | operator co_await (Task< V, E > &&task) noexcept |
template<typename Waited , typename = std::enable_if_t<is_waitable_v<Waited>>> | |
YACLIB_INLINE auto | AwaitOn (IExecutor &e, Waited &waited) noexcept |
template<typename... Waited, typename = std::enable_if_t<(... && is_waitable_v<Waited>)>> | |
YACLIB_INLINE auto | AwaitOn (IExecutor &e, Waited &... waited) noexcept |
template<typename Iterator , typename Value = typename std::iterator_traits<Iterator>::value_type, typename = std::enable_if_t<is_waitable_v<Value>>> | |
YACLIB_INLINE auto | AwaitOn (IExecutor &e, Iterator begin, std::size_t count) noexcept |
template<typename Iterator , typename = std::enable_if_t<is_waitable_v<typename std::iterator_traits<Iterator>::value_type>>> | |
YACLIB_INLINE auto | AwaitOn (IExecutor &e, Iterator begin, Iterator end) noexcept |
YACLIB_INLINE detail::CurrentAwaiter< false > | CurrentExecutor () noexcept |
Get current executor. | |
YACLIB_INLINE detail::CurrentAwaiter< true > | Yield () noexcept |
Instead of. | |
YACLIB_INLINE detail::OnAwaiter | On (IExecutor &e) noexcept |
TODO(mkornaukhov03) Add doxygen docs. | |
IExecutor & | MakeInline () noexcept |
Get Inline executor singleton object. | |
IExecutor & | MakeInline (StopTag) noexcept |
IExecutorPtr | MakeManual () |
IExecutorPtr | MakeStrand (IExecutorPtr e) |
Strand is the asynchronous analogue of a mutex. | |
template<typename Func > | |
void | Submit (IExecutor &executor, Func &&f) |
Submit given func for details. | |
void | SetFaultFrequency (std::uint32_t freq) noexcept |
Sets frequency with which fault will be injected. | |
void | SetSeed (std::uint32_t seed) noexcept |
Sets seed for random, which will be used when deciding when to yield, for fibers scheduler and random wrapper for tests. | |
void | SetFaultSleepTime (std::uint32_t ns) noexcept |
Sets sleep time if sleep is used instead of yield for interrupting thread execution for fault injection. | |
std::uint32_t | GetFaultSleepTime () noexcept |
void | SetAtomicFailFrequency (std::uint32_t k) noexcept |
Sets frequency with which compare_exchange_weak would fail. | |
detail::Injector * | GetInjector () noexcept |
void | InjectFault () noexcept |
std::uint64_t | GetInjectedCount () noexcept |
YACLIB_DEFINE_VOID_TYPE (Unit) | |
YACLIB_DEFINE_VOID_TYPE (StopTag) | |
template<typename V = Unit, typename E = StopError, typename... Args> | |
auto | MakeTask (Args &&... args) |
TODO(MBkkt) add description. | |
template<typename E = StopError, typename Func > | |
auto | Schedule (Func &&f) |
Execute Callable func on Inline executor. | |
template<typename E = StopError, typename Func > | |
auto | Schedule (IExecutor &e, Func &&f) |
Execute Callable func on executor. | |
template<typename V = void, typename E = StopError, typename Func > | |
auto | LazyContract (Func &&f) |
Execute Callable func on Inline executor. | |
template<typename V = void, typename E = StopError, typename Func > | |
auto | LazyContract (IExecutor &e, Func &&f) |
Execute Callable func on executor. | |
IntrusivePtr< FairThreadPool > | MakeFairThreadPool (std::uint64_t threads=yaclib_std::thread::hardware_concurrency()) |
template<typename To , typename From > | |
constexpr auto * | UpCast (From *from) noexcept |
template<typename To , typename From , typename = std::enable_if_t<!std::is_pointer_v<From>>> | |
constexpr auto & | UpCast (From &from) noexcept |
template<typename To , typename From > | |
constexpr auto * | DownCast (From *from) noexcept |
template<typename To , typename From > | |
constexpr auto & | DownCast (From &from) noexcept |
template<typename Func > | |
IFuncPtr | MakeFunc (Func &&f) |
Create shared IFunc object from any Callable func. | |
template<typename ObjectT , typename... Args> | |
auto | MakeUnique (Args &&... args) |
template<typename ObjectT , typename... Args> | |
auto | MakeShared (std::size_t n, Args &&... args) |
template<typename T , typename U > | |
bool | operator== (const IntrusivePtr< T > &lhs, const IntrusivePtr< U > &rhs) noexcept |
template<typename T , typename U > | |
bool | operator!= (const IntrusivePtr< T > &lhs, const IntrusivePtr< U > &rhs) noexcept |
template<typename T , typename U > | |
bool | operator== (const IntrusivePtr< T > &lhs, U *rhs) noexcept |
template<typename T , typename U > | |
bool | operator!= (const IntrusivePtr< T > &lhs, U *rhs) noexcept |
template<typename T , typename U > | |
bool | operator== (T *lhs, const IntrusivePtr< U > &rhs) noexcept |
template<typename T , typename U > | |
bool | operator!= (T *lhs, const IntrusivePtr< U > &rhs) noexcept |
template<typename T > | |
bool | operator== (const IntrusivePtr< T > &lhs, std::nullptr_t) noexcept |
template<typename T > | |
bool | operator== (std::nullptr_t, const IntrusivePtr< T > &rhs) noexcept |
template<typename T > | |
bool | operator!= (const IntrusivePtr< T > &lhs, std::nullptr_t) noexcept |
template<typename T > | |
bool | operator!= (std::nullptr_t, const IntrusivePtr< T > &rhs) noexcept |
template<typename T > | |
bool | operator< (const IntrusivePtr< T > &lhs, const IntrusivePtr< T > &rhs) noexcept |
template<bool Condition, typename T > | |
decltype(auto) | move_if (T &&arg) noexcept |
template<typename T > | |
constexpr bool | Check () noexcept |
Variables | |
constexpr detail::Yield | kYield |
Reschedule current job to it executor Useful for timeout checks, or if you job very big and doing only cpu not suspend work. | |
template<typename Func , typename... Arg> | |
constexpr bool | is_invocable_v = detail::IsInvocable<Func, Arg...>::Value |
template<typename T > | |
constexpr bool | is_result_v = detail::IsInstantiationOf<Result, T>::Value |
template<typename T > | |
constexpr bool | is_future_base_v |
template<typename T > | |
constexpr bool | is_shared_future_base_v |
template<typename T > | |
constexpr bool | is_task_v = detail::IsInstantiationOf<Task, T>::Value |
template<typename T > | |
constexpr bool | is_waitable_v |
template<typename T > | |
constexpr bool | is_waitable_with_timeout_v |
template<typename T , typename... List> | |
constexpr auto | Count = (std::size_t{std::is_same_v<T, List> ? 1 : 0} + ...) |
Describes channel with future and promise.
Definition at line 13 of file contract.hpp.
Definition at line 16 of file contract.hpp.
using yaclib::future_base_error_t = typedef typename detail::FutureBaseTypes<T>::Error |
Definition at line 68 of file type_traits.hpp.
using yaclib::future_base_value_t = typedef typename detail::FutureBaseTypes<T>::Value |
Definition at line 65 of file type_traits.hpp.
using yaclib::head_t = typedef typename detail::Head<Args...>::Type |
Definition at line 17 of file type_traits.hpp.
Definition at line 54 of file executor.hpp.
Definition at line 28 of file shared_func.hpp.
using yaclib::invoke_t = typedef typename detail::Invoke<Func, Arg...>::Type |
Definition at line 23 of file type_traits.hpp.
using yaclib::remove_cvref_t = typedef std::remove_cv_t<std::remove_reference_t<T> > |
Definition at line 14 of file type_traits.hpp.
using yaclib::result_error_t = typedef typename detail::InstantiationTypes<Result, T>::Error |
Definition at line 32 of file type_traits.hpp.
using yaclib::result_value_t = typedef typename detail::InstantiationTypes<Result, T>::Value |
Definition at line 29 of file type_traits.hpp.
using yaclib::shared_future_error_t = typedef typename detail::SharedFutureTypes<T>::Error |
Definition at line 74 of file type_traits.hpp.
using yaclib::shared_future_value_t = typedef typename detail::SharedFutureTypes<T>::Value |
Definition at line 71 of file type_traits.hpp.
using yaclib::SharedContract = typedef std::pair<SharedFuture<V, E>, SharedPromise<V, E> > |
Definition at line 12 of file shared_contract.hpp.
using yaclib::SharedContractOn = typedef std::pair<SharedFutureOn<V, E>, SharedPromise<V, E> > |
Definition at line 15 of file shared_contract.hpp.
using yaclib::task_error_t = typedef typename detail::InstantiationTypes<Task, T>::Error |
Definition at line 38 of file type_traits.hpp.
using yaclib::task_value_t = typedef typename detail::InstantiationTypes<Task, T>::Value |
Definition at line 35 of file type_traits.hpp.
|
strong |
This Policy describe how algorithm interpret if Future will be fulfilled by fail (exception or error)
None – fail same as ok, another words save all fails FirstFail – save first fail, default for WhenAll LastFail – save last fail, default for WhenAny
Enumerator | |
---|---|
None | |
FirstFail | |
LastFail |
Definition at line 12 of file fail_policy.hpp.
|
strong |
This Policy describe how algorithm produce result.
Fifo – order of results is fifo Note: non-deterministic in multithreading environment Note: now it's default for WhenAll because it allow call delete early Same – order of results same as order of input
Enumerator | |
---|---|
Fifo | |
Same |
Definition at line 13 of file order_policy.hpp.
|
strong |
Enumerator | |
---|---|
Value | |
Exception | |
Error | |
Empty |
Definition at line 16 of file result.hpp.
Execute Callable func on Inline executor.
f | func to execute |
Definition at line 93 of file run.hpp.
References MakeContract(), and MakeInline().
Execute Callable func on executor.
e | executor to be used to execute f and saved as callback executor for return Future |
f | func to execute |
Definition at line 110 of file run.hpp.
References yaclib::IExecutor::Inline, MakeContract(), and YACLIB_WARN.
Definition at line 98 of file run.hpp.
References MakeContract(), and MakeInline().
Definition at line 118 of file run.hpp.
References MakeContract().
|
noexcept |
Definition at line 44 of file await.hpp.
References Await(), and MakeContract().
|
noexcept |
Definition at line 34 of file await.hpp.
References MakeContract().
Definition at line 11 of file await.hpp.
References MakeContract(), and YACLIB_ASSERT.
Referenced by Await().
|
noexcept |
Definition at line 23 of file await.hpp.
References Count, MakeContract(), and YACLIB_ASSERT.
|
noexcept |
Definition at line 17 of file await.hpp.
References MakeContract(), and YACLIB_ASSERT.
|
noexcept |
Definition at line 38 of file await_on.hpp.
References AwaitOn(), and MakeContract().
|
noexcept |
Definition at line 28 of file await_on.hpp.
References MakeContract().
|
noexcept |
Definition at line 17 of file await_on.hpp.
References Count, MakeContract(), and YACLIB_ASSERT.
|
noexcept |
Definition at line 11 of file await_on.hpp.
References MakeContract(), and YACLIB_ASSERT.
Referenced by AwaitOn().
Definition at line 89 of file type_traits.hpp.
References MakeContract().
Definition at line 25 of file connect.hpp.
References MakeContract(), and YACLIB_ASSERT.
void yaclib::Connect | ( | const SharedFutureBase< V, E > & | f, |
SharedPromise< V, E > && | p | ||
) |
Definition at line 48 of file connect.hpp.
References MakeContract(), and YACLIB_ASSERT.
void yaclib::Connect | ( | FutureBase< V, E > && | f, |
Promise< V, E > && | p | ||
) |
Definition at line 11 of file connect.hpp.
References MakeContract(), and YACLIB_ASSERT.
Referenced by Share(), Share(), Share(), Share(), and Split().
void yaclib::Connect | ( | FutureBase< V, E > && | f, |
SharedPromise< V, E > && | p | ||
) |
Definition at line 36 of file connect.hpp.
References MakeContract(), and YACLIB_ASSERT.
void yaclib::Connect | ( | SharedPromise< V, E > & | primary, |
Promise< V, E > && | subsumed | ||
) |
Definition at line 60 of file connect.hpp.
References MakeContract(), and YACLIB_ASSERT.
void yaclib::Connect | ( | SharedPromise< V, E > & | primary, |
SharedPromise< V, E > && | subsumed | ||
) |
Definition at line 68 of file connect.hpp.
References MakeContract(), and YACLIB_ASSERT.
|
noexcept |
Get current executor.
Definition at line 41 of file current_executor.hpp.
Definition at line 39 of file cast.hpp.
References MakeContract().
Definition at line 26 of file cast.hpp.
References MakeContract(), and YACLIB_ASSERT.
Referenced by yaclib::detail::ResultCore< V, E >::Impl().
|
noexcept |
Definition at line 23 of file config.cpp.
References yaclib::detail::Injector::GetSleepTime().
Referenced by yaclib::fault::Scheduler::SleepPreemptive().
|
noexcept |
Definition at line 15 of file inject.cpp.
References yaclib::detail::Injector::GetInjectedCount().
|
noexcept |
Definition at line 6 of file inject.cpp.
References MakeContract().
Referenced by yaclib::fiber::GetInjectorState(), InjectFault(), and yaclib::fiber::SetInjectorState().
|
noexcept |
Definition at line 11 of file inject.cpp.
References GetInjector(), and yaclib::detail::Injector::MaybeInject().
Execute Callable func on Inline executor.
f | func to execute |
Definition at line 59 of file schedule.hpp.
References MakeContract(), and MakeInline().
Execute Callable func on executor.
e | executor to be used to execute f and saved as callback executor for return Future |
f | func to execute |
Definition at line 71 of file schedule.hpp.
References yaclib::IExecutor::Inline, MakeContract(), and YACLIB_WARN.
Contract< V, E > yaclib::MakeContract | ( | ) |
Creates related future and promise.
Definition at line 25 of file contract.hpp.
References MakeContract().
Referenced by yaclib::detail::AtomicCounter< CounterBase, Deleter >::Add(), yaclib::detail::AllCombinator< O, R, E >::AddInput(), yaclib::detail::AllCombinator< OrderPolicy::Same, R, E >::AddInput(), yaclib::detail::AnyCombinator< V, E, P >::AddInput(), yaclib::detail::fiber::DefaultAllocator::Allocate(), AsyncContract(), AsyncContract(), AsyncSharedContract(), AsyncSharedContract(), yaclib::WaitGroup< Event >::Attach(), yaclib::WaitGroup< Event >::Attach(), yaclib::WaitGroup< Event >::Attach(), Await(), Await(), Await(), Await(), Await(), yaclib::detail::Destroy::await_suspend(), yaclib::detail::MultiAwaitAwaiter< Event >::await_suspend(), yaclib::detail::MutexImpl< FIFO, Batching >::AwaitLock(), yaclib::detail::SharedMutexImpl< FIFO, ReadersFIFO >::AwaitLock(), yaclib::detail::SharedMutexImpl< FIFO, ReadersFIFO >::AwaitLockShared(), AwaitOn(), AwaitOn(), AwaitOn(), AwaitOn(), yaclib::detail::AwaitOnEvent< Single >::AwaitOnEvent(), yaclib::detail::MutexImpl< FIFO, Batching >::AwaitUnlock(), yaclib::detail::MutexImpl< FIFO, Batching >::AwaitUnlockOn(), yaclib::detail::BaseCore::BaseCore(), yaclib::detail::MutexImpl< FIFO, Batching >::BatchingPossible(), yaclib::detail::fiber::BiList::BiList(), yaclib::OneShotEvent::Call(), yaclib::detail::ReadyCore< V, E >::Call(), yaclib::detail::UniqueCore< V, E >::CallInline(), yaclib::Task< V, E >::Cancel(), yaclib::Mutex< Batching, FIFO >::Cast(), yaclib::SharedMutex< FIFO, ReadersFIFO >::Cast(), Check(), yaclib::detail::AtomicFlag< Impl >::clear(), yaclib::detail::AtomicFlag< Impl >::clear(), yaclib::detail::AnyCombinatorBase< V, E, FailPolicy::LastFail >::Combine(), yaclib::detail::AnyCombinatorBase< V, E, FailPolicy::FirstFail >::Combine(), yaclib::detail::AtomicBase< Impl, T >::compare_exchange_strong(), yaclib::detail::AtomicBase< Impl, T >::compare_exchange_strong(), yaclib::detail::AtomicBase< Impl, T >::compare_exchange_strong(), yaclib::detail::AtomicBase< Impl, T >::compare_exchange_strong(), yaclib::detail::fiber::AtomicBase< T >::compare_exchange_strong(), yaclib::detail::fiber::AtomicBase< T >::compare_exchange_strong(), yaclib::detail::fiber::AtomicBase< T >::compare_exchange_strong(), yaclib::detail::fiber::AtomicBase< T >::compare_exchange_strong(), yaclib::detail::AtomicBase< Impl, T >::compare_exchange_weak(), yaclib::detail::AtomicBase< Impl, T >::compare_exchange_weak(), yaclib::detail::AtomicBase< Impl, T >::compare_exchange_weak(), yaclib::detail::AtomicBase< Impl, T >::compare_exchange_weak(), yaclib::detail::fiber::AtomicBase< T >::compare_exchange_weak(), yaclib::detail::fiber::AtomicBase< T >::compare_exchange_weak(), yaclib::detail::fiber::AtomicBase< T >::compare_exchange_weak(), yaclib::detail::fiber::AtomicBase< T >::compare_exchange_weak(), yaclib::detail::fiber::AtomicBase< T >::CompareExchangeHelper(), Connect(), Connect(), Connect(), Connect(), Connect(), Connect(), yaclib::WaitGroup< Event >::Consume(), yaclib::WaitGroup< Event >::Consume(), yaclib::WaitGroup< Event >::Consume(), yaclib::WaitGroup< Event >::Count(), yaclib::detail::CVStatusFrom(), yaclib::detail::CVStatusFrom(), yaclib::detail::PromiseTypeDeleter< Lazy, Shared >::Delete(), yaclib::FutureOn< V, E >::Detach(), yaclib::Task< V, E >::Detach(), yaclib::FutureBase< V, E >::Detach(), yaclib::FutureBase< V, E >::DetachInline(), DownCast(), DownCast(), yaclib::ManualExecutor::Drain(), yaclib::detail::ReadyCore< V, E >::Drop(), yaclib::detail::BaseCore::Empty(), yaclib::detail::fiber::Node::Erase(), yaclib::detail::AtomicBase< Impl, T >::exchange(), yaclib::detail::AtomicBase< Impl, T >::exchange(), yaclib::detail::fiber::AtomicBase< T >::exchange(), yaclib::detail::fiber::AtomicBase< T >::exchange(), yaclib::detail::fiber::ExecutionContext::Exit(), yaclib::FairThreadPool::FairThreadPool(), yaclib::detail::Atomic< Impl, U * >::fetch_add(), yaclib::detail::Atomic< Impl, U * >::fetch_add(), yaclib::detail::fiber::Atomic< U * >::fetch_add(), yaclib::detail::fiber::Atomic< U * >::fetch_add(), yaclib::detail::AtomicFloatingBase< Impl, T, true >::fetch_add(), yaclib::detail::AtomicFloatingBase< Impl, T, true >::fetch_add(), yaclib::detail::fiber::AtomicFloatingBase< T, true >::fetch_add(), yaclib::detail::fiber::AtomicFloatingBase< T, true >::fetch_add(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::fetch_and(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::fetch_and(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::fetch_and(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::fetch_and(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::fetch_or(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::fetch_or(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::fetch_or(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::fetch_or(), yaclib::detail::Atomic< Impl, U * >::fetch_sub(), yaclib::detail::Atomic< Impl, U * >::fetch_sub(), yaclib::detail::fiber::Atomic< U * >::fetch_sub(), yaclib::detail::fiber::Atomic< U * >::fetch_sub(), yaclib::detail::AtomicFloatingBase< Impl, T, true >::fetch_sub(), yaclib::detail::AtomicFloatingBase< Impl, T, true >::fetch_sub(), yaclib::detail::fiber::AtomicFloatingBase< T, true >::fetch_sub(), yaclib::detail::fiber::AtomicFloatingBase< T, true >::fetch_sub(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::fetch_xor(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::fetch_xor(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::fetch_xor(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::fetch_xor(), yaclib::fiber::ForwardToFaultRandomCount(), yaclib::detail::ForwardToRandCount(), yaclib::detail::fiber::SystemClock::from_time_t(), yaclib::detail::FuncCore< Func >::FuncCore(), yaclib::detail::AtomicCounter< CounterBase, Deleter >::Get(), yaclib::detail::fiber::BiList::GetElement(), yaclib::detail::fiber::GetImpl(), GetInjector(), yaclib::detail::fiber::GetMap(), yaclib::detail::GetRandCount(), yaclib::detail::GetRandNumber(), yaclib::detail::fiber::FiberBase::GetTLS(), yaclib::detail::Guard< M, Shared >::Guard(), yaclib::detail::Guard< M, Shared >::Guard(), yaclib::detail::Guard< M, Shared >::Guard(), yaclib::detail::Guard< M, Shared >::Guard(), yaclib::detail::GuardState::GuardState(), yaclib::detail::GuardState::GuardState(), yaclib::detail::PromiseType< V, E, Lazy, Shared >::Handle(), yaclib::FairThreadPool::HardStop(), yaclib::detail::CallCallback< Derived >::Here(), yaclib::detail::ReadyCore< V, E >::Here(), yaclib::detail::DropCallback< Derived >::Here(), yaclib::detail::AwaitEvent::Here(), yaclib::detail::AwaitOnEvent< Single >::Here(), yaclib::detail::SharedCore< V, E >::Here(), yaclib::detail::UniqueCore< V, E >::Here(), yaclib::detail::ResultCore< V, E >::Impl(), yaclib::IntrusivePtr< T >::IntrusivePtr(), yaclib::IntrusivePtr< T >::IntrusivePtr(), yaclib::IntrusivePtr< V, E >::IntrusivePtr(), yaclib::IntrusivePtr< T >::IntrusivePtr(), yaclib::IntrusivePtr< T >::IntrusivePtr(), yaclib::IntrusivePtr< T >::IntrusivePtr(), yaclib::IntrusivePtr< T >::IntrusivePtr(), yaclib::detail::IsCall(), yaclib::detail::IsDetach(), yaclib::detail::IsFromShared(), yaclib::detail::IsFromUnique(), yaclib::detail::IsLazy(), yaclib::detail::IsRun(), yaclib::detail::IsToShared(), yaclib::detail::IsToUnique(), LazyContract(), LazyContract(), yaclib::detail::List::List(), yaclib::detail::AtomicBase< Impl, T >::load(), yaclib::detail::AtomicBase< Impl, T >::load(), yaclib::detail::Guard< M, Shared >::Lock(), yaclib::StickyGuard< M >::Lock(), yaclib::detail::LogMessage(), yaclib::detail::Loop(), yaclib::detail::AllCombinator< O, R, E >::Make(), yaclib::detail::AllCombinator< OrderPolicy::Same, R, E >::Make(), yaclib::detail::AnyCombinator< V, E, P >::Make(), MakeContract(), MakeContractOn(), yaclib::detail::MakeCore(), yaclib::detail::MakeDrop(), MakeFairThreadPool(), MakeFunc(), MakeFuture(), MakeInline(), MakeInline(), MakeManual(), MakeShared(), MakeSharedContract(), MakeSharedContractOn(), MakeSharedPromise(), MakeStrand(), MakeTask(), MakeUnique(), yaclib::detail::MakeUniqueJob(), move_if(), yaclib::detail::ResultCore< V, E >::MoveOrConst(), yaclib::detail::MoveToCaller(), yaclib::detail::Guard< M, Shared >::Mutex(), yaclib::detail::Noop(), yaclib::detail::fiber::FiberQueue::NotifyAll(), On(), operator co_await(), operator co_await(), operator co_await(), operator!=(), operator!=(), operator!=(), yaclib::detail::fiber::operator!=(), yaclib::detail::fiber::operator!=(), yaclib::detail::fiber::operator!=(), operator!=(), yaclib::detail::fiber::operator!=(), operator!=(), yaclib::detail::fiber::operator!=(), yaclib::detail::operator&(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator&=(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::operator&=(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator&=(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::operator&=(), yaclib::detail::fiber::ThreadLocalPtrProxy< Type >::operator*(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator++(), yaclib::detail::Atomic< Impl, U * >::operator++(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator++(), yaclib::detail::Atomic< Impl, U * >::operator++(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator++(), yaclib::detail::Atomic< Impl, U * >::operator++(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator++(), yaclib::detail::Atomic< Impl, U * >::operator++(), yaclib::detail::Atomic< Impl, U * >::operator+=(), yaclib::detail::fiber::Atomic< U * >::operator+=(), yaclib::detail::Atomic< Impl, U * >::operator+=(), yaclib::detail::fiber::Atomic< U * >::operator+=(), yaclib::detail::AtomicFloatingBase< Impl, T, true >::operator+=(), yaclib::detail::fiber::AtomicFloatingBase< T, true >::operator+=(), yaclib::detail::AtomicFloatingBase< Impl, T, true >::operator+=(), yaclib::detail::fiber::AtomicFloatingBase< T, true >::operator+=(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator--(), yaclib::detail::Atomic< Impl, U * >::operator--(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator--(), yaclib::detail::Atomic< Impl, U * >::operator--(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator--(), yaclib::detail::Atomic< Impl, U * >::operator--(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator--(), yaclib::detail::Atomic< Impl, U * >::operator--(), yaclib::detail::Atomic< Impl, U * >::operator-=(), yaclib::detail::fiber::Atomic< U * >::operator-=(), yaclib::detail::Atomic< Impl, U * >::operator-=(), yaclib::detail::fiber::Atomic< U * >::operator-=(), yaclib::detail::AtomicFloatingBase< Impl, T, true >::operator-=(), yaclib::detail::fiber::AtomicFloatingBase< T, true >::operator-=(), yaclib::detail::AtomicFloatingBase< Impl, T, true >::operator-=(), yaclib::detail::fiber::AtomicFloatingBase< T, true >::operator-=(), operator<(), yaclib::detail::fiber::operator<(), yaclib::detail::fiber::operator<(), yaclib::detail::fiber::operator<(), yaclib::detail::fiber::operator<(), yaclib::detail::fiber::operator<(), yaclib::detail::fiber::operator<=(), yaclib::detail::fiber::operator<=(), yaclib::detail::fiber::operator<=(), yaclib::detail::fiber::operator<=(), yaclib::detail::fiber::operator<=(), yaclib::Result< ValueT, E >::operator=(), yaclib::detail::fiber::BiList::operator=(), yaclib::IntrusivePtr< T >::operator=(), yaclib::detail::fiber::ThreadLocalPtrProxy< Type >::operator=(), yaclib::detail::fiber::ThreadLocalPtrProxy< Type >::operator=(), yaclib::detail::fiber::FiberQueue::operator=(), yaclib::detail::Guard< M, Shared >::operator=(), yaclib::detail::GuardState::operator=(), yaclib::IntrusivePtr< V, E >::operator=(), yaclib::IntrusivePtr< T >::operator=(), yaclib::detail::fiber::Stack::operator=(), yaclib::StickyGuard< M >::operator=(), yaclib::detail::AtomicBase< Impl, T >::operator=(), yaclib::detail::fiber::AtomicWait< T >::operator=(), yaclib::detail::AtomicBase< Impl, T >::operator=(), yaclib::detail::fiber::AtomicWait< T >::operator=(), yaclib::detail::fiber::Thread::operator=(), yaclib::detail::fiber::ThreadLocalPtrProxy< Type >::operator=(), yaclib::detail::fiber::ThreadLocalPtrProxy< Type >::operator=(), yaclib::detail::fiber::ThreadLocalPtrProxy< Type >::operator=(), operator==(), operator==(), operator==(), yaclib::detail::fiber::operator==(), yaclib::detail::fiber::operator==(), yaclib::detail::fiber::operator==(), operator==(), yaclib::detail::fiber::operator==(), operator==(), yaclib::detail::fiber::operator==(), yaclib::detail::fiber::operator>(), yaclib::detail::fiber::operator>(), yaclib::detail::fiber::operator>(), yaclib::detail::fiber::operator>(), yaclib::detail::fiber::operator>(), yaclib::detail::fiber::operator>=(), yaclib::detail::fiber::operator>=(), yaclib::detail::fiber::operator>=(), yaclib::detail::fiber::operator>=(), yaclib::detail::fiber::operator>=(), yaclib::detail::fiber::ThreadLocalPtrProxy< Type >::operator[](), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator^=(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::operator^=(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator^=(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::operator^=(), yaclib::detail::operator|(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator|=(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::operator|=(), yaclib::detail::AtomicIntegralBase< Impl, T, true >::operator|=(), yaclib::detail::fiber::AtomicIntegralBase< T, true >::operator|=(), yaclib::detail::fiber::PollRandomElementFromList(), yaclib::detail::fiber::BiList::PopBack(), yaclib::detail::List::PopFront(), yaclib::detail::fiber::BiList::PushAll(), yaclib::detail::List::PushBack(), yaclib::detail::Stack::PushBack(), yaclib::detail::fiber::BiList::PushBack(), yaclib::detail::List::PushFront(), yaclib::detail::Stack::PushFront(), yaclib::detail::ReadyCore< V, E >::ReadyCore(), yaclib::detail::Guard< M, Shared >::Release(), yaclib::IntrusivePtr< T >::Release(), yaclib::detail::fiber::DefaultAllocator::Release(), yaclib::detail::GuardState::ReleaseState(), yaclib::OneShotEvent::Reset(), yaclib::IntrusivePtr< T >::Reset(), yaclib::detail::BaseCore::ResetImpl(), yaclib::Result< ValueT, E >::Result(), yaclib::Result< ValueT, E >::Result(), yaclib::ResultError< Error >::ResultError(), yaclib::detail::fiber::FiberBase::Resume(), yaclib::detail::PromiseType< V, E, Lazy, Shared >::return_value(), Run(), yaclib::detail::Run(), Run(), RunShared(), yaclib::detail::RunShared(), RunShared(), Schedule(), yaclib::detail::Schedule(), Schedule(), yaclib::OneShotEvent::Set(), yaclib::Promise< V, E >::Set(), yaclib::SharedPromise< V, E >::Set(), yaclib::fault::Scheduler::Set(), yaclib::detail::fiber::Set(), SetAtomicFailFrequency(), yaclib::detail::SetAtomicWeakFailFrequency(), yaclib::detail::fiber::DefaultAllocator::SetCacheSize(), yaclib::detail::SetCallback(), yaclib::detail::UniqueHandle::SetCallback(), yaclib::detail::SharedHandle::SetCallback(), yaclib::detail::SharedCore< V, E >::SetCallback(), yaclib::detail::UniqueCore< V, E >::SetCallback(), yaclib::detail::SetCallback(), yaclib::detail::BaseCore::SetCallbackImpl(), yaclib::detail::SetCallbacksDynamic(), yaclib::detail::SetCallbacksStatic(), yaclib::detail::fiber::SetDefault(), SetFaultFrequency(), yaclib::fiber::SetFaultRandomListPick(), SetFaultSleepTime(), yaclib::fiber::SetFaultTickLength(), yaclib::detail::Injector::SetFrequency(), yaclib::fiber::SetHardwareConcurrency(), yaclib::fiber::SetInjectorState(), yaclib::detail::SharedCore< V, E >::SetInline(), yaclib::detail::UniqueCore< V, E >::SetInline(), yaclib::detail::BaseCore::SetInlineImpl(), yaclib::detail::fiber::FiberBase::SetJoiningFiber(), yaclib::detail::fiber::DefaultAllocator::SetMinStackSize(), yaclib::detail::fiber::SetRandomListPick(), yaclib::detail::UniqueHandle::SetResult(), yaclib::detail::BaseCore::SetResultImpl(), yaclib::detail::SetSeed(), SetSeed(), yaclib::detail::Injector::SetSleepTime(), yaclib::fiber::SetStackCacheSize(), yaclib::fiber::SetStackSize(), yaclib::detail::fiber::FiberBase::SetState(), yaclib::detail::Injector::SetState(), yaclib::fault::Scheduler::SetTickLength(), yaclib::detail::fiber::FiberBase::SetTLS(), yaclib::detail::fiber::ExecutionContext::Setup(), Share(), Share(), Share(), Share(), yaclib::detail::ShouldFailAtomicWeak(), yaclib::fault::Scheduler::Sleep(), yaclib::fault::Scheduler::SleepPreemptive(), Split(), Split(), yaclib::detail::Stack::Stack(), yaclib::detail::fiber::ExecutionContext::Start(), yaclib::detail::Start(), yaclib::detail::Start(), yaclib::detail::Step(), yaclib::StickyGuard< M >::StickyGuard(), yaclib::detail::ResultCore< V, E >::Store(), yaclib::detail::AtomicBase< Impl, T >::store(), yaclib::detail::AtomicBase< Impl, T >::store(), yaclib::detail::fiber::AtomicBase< T >::store(), yaclib::detail::fiber::AtomicBase< T >::store(), yaclib::detail::UniqueHandle::StoreCallback(), yaclib::detail::NoResultCore::StoreCallback(), yaclib::detail::UniqueCore< V, E >::StoreCallback(), yaclib::detail::BaseCore::StoreCallbackImpl(), yaclib::Strand::Strand(), yaclib::detail::AtomicCounter< CounterBase, Deleter >::Sub(), yaclib::detail::AtomicCounter< CounterBase, Deleter >::SubEqual(), Submit(), yaclib::ManualExecutor::Submit(), yaclib::Strand::Submit(), yaclib::SharedFutureOn< V, E >::Subscribe(), yaclib::SharedFutureBase< V, E >::Subscribe(), yaclib::SharedFutureBase< V, E >::SubscribeInline(), yaclib::detail::Guard< M, Shared >::Swap(), yaclib::detail::GuardState::Swap(), yaclib::IntrusivePtr< T >::Swap(), yaclib::StickyGuard< M >::Swap(), yaclib::detail::fiber::Thread::swap(), yaclib::detail::fiber::ExecutionContext::SwitchTo(), yaclib::detail::Tag(), TEST(), TEST(), yaclib::detail::AtomicFlag< Impl >::test_and_set(), yaclib::detail::AtomicFlag< Impl >::test_and_set(), yaclib::detail::fiber::AtomicFlag::test_and_set(), yaclib::detail::fiber::AtomicFlag::test_and_set(), yaclib::FutureOn< V, E >::Then(), yaclib::Task< V, E >::Then(), yaclib::SharedFutureOn< V, E >::Then(), yaclib::FutureBase< V, E >::Then(), yaclib::Task< V, E >::Then(), yaclib::SharedFutureBase< V, E >::Then(), yaclib::Future< V, E >::ThenInline(), yaclib::FutureOn< V, E >::ThenInline(), yaclib::Task< V, E >::ThenInline(), yaclib::SharedFuture< V, E >::ThenInline(), yaclib::SharedFutureOn< V, E >::ThenInline(), yaclib::detail::fiber::Thread::Thread(), yaclib::detail::fiber::ThreadLocalPtrProxy< Type >::ThreadLocalPtrProxy(), yaclib::detail::fiber::ThreadLocalPtrProxy< Type >::ThreadLocalPtrProxy(), yaclib::detail::fiber::ThreadLocalPtrProxy< Type >::ThreadLocalPtrProxy(), yaclib::Task< V, E >::ToFuture(), yaclib::detail::fiber::Fiber< Args >::Trampoline(), yaclib::detail::BaseCore::TransferExecutorTo(), yaclib::detail::Mutex< Impl >::try_lock(), yaclib::detail::fiber::RecursiveTimedMutex::try_lock_for(), yaclib::detail::fiber::SharedTimedMutex::try_lock_for(), yaclib::detail::fiber::TimedMutex::try_lock_for(), yaclib::detail::SharedTimedMutex< Impl >::try_lock_for(), yaclib::detail::TimedMutex< Impl >::try_lock_for(), yaclib::detail::SharedMutex< Impl >::try_lock_shared(), yaclib::detail::fiber::SharedTimedMutex::try_lock_shared_for(), yaclib::detail::SharedTimedMutex< Impl >::try_lock_shared_for(), yaclib::detail::fiber::SharedTimedMutex::try_lock_shared_until(), yaclib::detail::SharedTimedMutex< Impl >::try_lock_shared_until(), yaclib::detail::fiber::RecursiveTimedMutex::try_lock_until(), yaclib::detail::fiber::SharedTimedMutex::try_lock_until(), yaclib::detail::fiber::TimedMutex::try_lock_until(), yaclib::detail::SharedTimedMutex< Impl >::try_lock_until(), yaclib::detail::TimedMutex< Impl >::try_lock_until(), yaclib::OneShotEvent::TryAdd(), yaclib::detail::Guard< M, Shared >::TryLock(), yaclib::detail::MutexImpl< FIFO, Batching >::TryLockAwait(), yaclib::detail::SharedMutexImpl< FIFO, ReadersFIFO >::TryLockAwait(), yaclib::detail::SharedMutexImpl< FIFO, ReadersFIFO >::TryLockShared(), yaclib::detail::MutexImpl< FIFO, Batching >::TryUnlockAwait(), yaclib::detail::Guard< M, Shared >::Unlock(), yaclib::StickyGuard< M >::Unlock(), yaclib::detail::Guard< M, Shared >::UnlockHere(), yaclib::detail::SharedMutexImpl< FIFO, ReadersFIFO >::UnlockHere(), yaclib::detail::SharedMutexImpl< FIFO, ReadersFIFO >::UnlockHereShared(), yaclib::detail::Guard< M, Shared >::UnlockOn(), yaclib::Mutex< Batching, FIFO >::UnlockOn(), UpCast(), UpCast(), yaclib::OneShotEvent::Wait(), yaclib::FairThreadPool::Wait(), yaclib::detail::fiber::FiberQueue::Wait(), Wait(), Wait(), yaclib::detail::ConditionVariableAny< Impl >::wait(), yaclib::detail::fiber::ConditionVariable::wait(), yaclib::detail::ConditionVariable< Impl >::wait(), yaclib::detail::ConditionVariable< Impl >::wait(), yaclib::detail::MutexEvent::Wait(), yaclib::detail::MutexEvent::Wait(), yaclib::detail::MutexEvent::Wait(), Wait(), yaclib::detail::ConditionVariableAny< Impl >::wait_for(), yaclib::detail::ConditionVariableAny< Impl >::wait_for(), yaclib::detail::fiber::ConditionVariable::wait_for(), yaclib::detail::ConditionVariable< Impl >::wait_for(), yaclib::detail::ConditionVariable< Impl >::wait_for(), yaclib::detail::ConditionVariableAny< Impl >::wait_until(), yaclib::detail::ConditionVariableAny< Impl >::wait_until(), yaclib::detail::fiber::ConditionVariable::wait_until(), yaclib::detail::ConditionVariable< Impl >::wait_until(), yaclib::detail::ConditionVariable< Impl >::wait_until(), yaclib::detail::WaitCore(), yaclib::OneShotEvent::WaitFor(), yaclib::WaitGroup< Event >::WaitFor(), WaitFor(), WaitFor(), WaitFor(), yaclib::detail::WaitIterator(), yaclib::detail::WaitRange(), yaclib::OneShotEvent::WaitUntil(), yaclib::WaitGroup< Event >::WaitUntil(), WaitUntil(), WaitUntil(), WaitUntil(), WhenAll(), WhenAll(), WhenAll(), WhenAny(), WhenAny(), WhenAny(), yaclib::detail::WhenImpl(), yaclib::detail::WhenImpl(), yaclib::detail::WhenSetResult(), yaclib::detail::AllCombinator< O, R, E >::~AllCombinator(), yaclib::detail::AllCombinator< OrderPolicy::Same, R, E >::~AllCombinator(), yaclib::detail::AnyCombinatorBase< V, E, FailPolicy::FirstFail >::~AnyCombinatorBase(), yaclib::detail::fiber::Fiber< Args >::~Fiber(), yaclib::Promise< V, E >::~Promise(), yaclib::detail::ResultCore< V, E >::~ResultCore(), and yaclib::SharedPromise< V, E >::~SharedPromise().
ContractOn< V, E > yaclib::MakeContractOn | ( | IExecutor & | e | ) |
Definition at line 33 of file contract.hpp.
References MakeContract().
IntrusivePtr< FairThreadPool > yaclib::MakeFairThreadPool | ( | std::uint64_t | threads = yaclib_std::thread::hardware_concurrency() | ) |
Definition at line 109 of file fair_thread_pool.cpp.
References MakeContract().
Create shared IFunc object from any Callable func.
f | Callable object |
Definition at line 36 of file shared_func.hpp.
References MakeContract().
Function for create Ready Future.
V | if not default value, it's type of Future value |
E | type of Future error, by default its |
Args | if single, and V default, then used as type of Future value |
args | for fulfill Future |
Definition at line 25 of file make.hpp.
References MakeContract().
|
noexcept |
Get Inline executor singleton object.
This executor immediately executes given Callable object in the same OS thread without any overhead. So it always return false from Submit, we only call Call, no submit
Definition at line 34 of file inline.cpp.
References MakeContract().
Referenced by AsyncContract(), AsyncSharedContract(), yaclib::Task< V, E >::Cancel(), LazyContract(), Run(), RunShared(), and Schedule().
Definition at line 38 of file inline.cpp.
References MakeContract().
IExecutorPtr yaclib::MakeManual | ( | ) |
Definition at line 28 of file manual.cpp.
References MakeContract().
Definition at line 38 of file helper.hpp.
References MakeContract().
SharedContract< V, E > yaclib::MakeSharedContract | ( | ) |
Definition at line 18 of file shared_contract.hpp.
References yaclib::detail::kSharedRefWithFuture, and MakeContract().
SharedContract< V, E > yaclib::MakeSharedContractOn | ( | IExecutor & | e | ) |
Definition at line 26 of file shared_contract.hpp.
References yaclib::detail::kSharedRefWithFuture, and MakeContract().
SharedPromise< V, E > yaclib::MakeSharedPromise | ( | ) |
Definition at line 36 of file shared_contract.hpp.
References yaclib::detail::kSharedRefNoFuture, and MakeContract().
IExecutorPtr yaclib::MakeStrand | ( | IExecutorPtr | e | ) |
Strand is the asynchronous analogue of a mutex.
It guarantees that the tasks scheduled for it will be executed strictly sequentially. Strand itself does not have its own threads, it decorates another executor and uses it to run its tasks.
e | executor to decorate |
Definition at line 71 of file strand.cpp.
References MakeContract().
Referenced by TEST().
Definition at line 33 of file helper.hpp.
References MakeContract().
Definition at line 77 of file type_traits.hpp.
References MakeContract().
|
noexcept |
TODO(mkornaukhov03) Add doxygen docs.
Definition at line 11 of file on.hpp.
References MakeContract().
Referenced by yaclib::detail::SetCallback().
|
noexcept |
Definition at line 57 of file await.hpp.
References MakeContract(), and YACLIB_ASSERT.
|
noexcept |
Definition at line 51 of file await.hpp.
References MakeContract(), and YACLIB_ASSERT.
|
noexcept |
Definition at line 63 of file await.hpp.
References MakeContract(), and YACLIB_ASSERT.
|
inlinenoexcept |
Definition at line 71 of file intrusive_ptr.hpp.
References MakeContract().
|
inlinenoexcept |
Definition at line 106 of file intrusive_ptr.hpp.
References MakeContract().
|
inlinenoexcept |
Definition at line 81 of file intrusive_ptr.hpp.
References MakeContract().
|
inlinenoexcept |
Definition at line 111 of file intrusive_ptr.hpp.
References MakeContract().
|
inlinenoexcept |
Definition at line 91 of file intrusive_ptr.hpp.
References MakeContract().
|
inlinenoexcept |
Definition at line 116 of file intrusive_ptr.hpp.
References MakeContract().
|
inlinenoexcept |
Definition at line 66 of file intrusive_ptr.hpp.
References yaclib::IntrusivePtr< T >::Get(), and MakeContract().
|
inlinenoexcept |
Definition at line 96 of file intrusive_ptr.hpp.
References MakeContract().
|
inlinenoexcept |
Definition at line 76 of file intrusive_ptr.hpp.
References MakeContract().
|
inlinenoexcept |
Definition at line 101 of file intrusive_ptr.hpp.
References MakeContract().
|
inlinenoexcept |
Definition at line 86 of file intrusive_ptr.hpp.
References MakeContract().
Execute Callable func on Inline executor.
f | func to execute |
Definition at line 57 of file run.hpp.
References MakeContract(), and MakeInline().
Referenced by CalculatorService::Double(), CalculatorService::Increment(), TEST(), TEST(), TEST(), TEST(), and TEST().
Execute Callable func on executor.
e | executor to be used to execute f and saved as callback executor for return Future |
f | func to execute |
Definition at line 74 of file run.hpp.
References yaclib::IExecutor::Inline, MakeContract(), and YACLIB_WARN.
Definition at line 62 of file run.hpp.
References MakeContract(), and MakeInline().
Definition at line 82 of file run.hpp.
References MakeContract().
Execute Callable func on Inline executor.
f | func to execute |
Definition at line 33 of file schedule.hpp.
References MakeContract(), and MakeInline().
Execute Callable func on executor.
e | executor to be used to execute f and saved as callback executor for return Future |
f | func to execute |
Definition at line 45 of file schedule.hpp.
References yaclib::IExecutor::Inline, MakeContract(), and YACLIB_WARN.
|
noexcept |
Sets frequency with which compare_exchange_weak would fail.
Default is 13
Definition at line 27 of file config.cpp.
References MakeContract(), and yaclib::detail::SetAtomicWeakFailFrequency().
|
noexcept |
Sets frequency with which fault will be injected.
Default is 16.
Definition at line 15 of file config.cpp.
References MakeContract(), and yaclib::detail::Injector::SetFrequency().
|
noexcept |
Sets sleep time if sleep is used instead of yield for interrupting thread execution for fault injection.
Default is 200
Definition at line 19 of file config.cpp.
References MakeContract(), and yaclib::detail::Injector::SetSleepTime().
|
noexcept |
Sets seed for random, which will be used when deciding when to yield, for fibers scheduler and random wrapper for tests.
Default is 1239.
Definition at line 33 of file config.cpp.
References MakeContract(), and yaclib::detail::SetSeed().
Future< V, E > yaclib::Share | ( | const SharedFutureBase< V, E > & | future | ) |
Definition at line 11 of file share.hpp.
References Connect(), and MakeContract().
Definition at line 18 of file share.hpp.
References Connect(), and MakeContract().
Definition at line 25 of file share.hpp.
References Connect(), MakeContract(), and YACLIB_ASSERT.
FutureOn< V, E > yaclib::Share | ( | SharedPromise< V, E > & | promise, |
IExecutor & | executor | ||
) |
Definition at line 33 of file share.hpp.
References Connect(), MakeContract(), and YACLIB_ASSERT.
SharedFuture< V, E > yaclib::Split | ( | FutureBase< V, E > && | future | ) |
Definition at line 10 of file split.hpp.
References Connect(), and MakeContract().
SharedFuture< V, E > yaclib::Split | ( | SharedPromise< V, E > & | promise | ) |
Definition at line 18 of file split.hpp.
References yaclib::SharedFutureBase< V, E >::GetCore(), MakeContract(), and YACLIB_ASSERT.
Submit given func for details.
This method creates Job with one allocation and call Submit(Job)
f | func to execute |
Definition at line 17 of file submit.hpp.
References MakeContract(), and yaclib::detail::MakeUniqueJob().
Definition at line 21 of file cast.hpp.
References MakeContract().
Definition at line 9 of file cast.hpp.
References MakeContract().
|
noexcept |
Wait until Ready becomes true.
begin | iterator to futures to wait |
end | iterator to futures to wait |
Definition at line 30 of file wait.hpp.
References MakeContract().
|
noexcept |
Wait until Ready becomes true.
begin | iterator to futures to wait |
count | of futures to wait |
Definition at line 44 of file wait.hpp.
References MakeContract().
|
noexcept |
Wait until Ready becomes true.
fs | one or more futures to wait |
Definition at line 18 of file wait.hpp.
References MakeContract(), and YACLIB_ASSERT.
Referenced by yaclib::FutureBase< V, E >::Get(), yaclib::SharedFutureBase< V, E >::Get(), and yaclib::SharedFutureBase< V, E >::Get().
|
noexcept |
Wait until the specified timeout duration has elapsed or Ready becomes true.
The behavior is undefined if Valid is false before the call to this function. This function may block for longer than timeout_duration due to scheduling or resource contention delays.
timeout_duration | maximum duration to block for |
begin | iterator to futures to wait |
end | iterator to futures to wait |
Definition at line 41 of file wait_for.hpp.
References MakeContract().
|
noexcept |
Wait until the specified timeout duration has elapsed or Ready becomes true.
The behavior is undefined if Valid is false before the call to this function. This function may block for longer than timeout_duration due to scheduling or resource contention delays.
timeout_duration | maximum duration to block for |
begin | iterator to futures to wait |
count | of futures to wait |
Definition at line 59 of file wait_for.hpp.
References MakeContract().
|
noexcept |
Wait until the specified timeout duration has elapsed or Ready becomes true.
The behavior is undefined if Valid is false before the call to this function. This function may block for longer than timeout_duration due to scheduling or resource contention delays.
timeout_duration | maximum duration to block for |
fs | futures to wait |
Definition at line 23 of file wait_for.hpp.
References MakeContract(), and YACLIB_ASSERT.
|
noexcept |
Wait until specified time has been reached or Ready becomes true.
The behavior is undefined if Valid is false before the call to this function. This function may block for longer than until after timeout_time has been reached due to scheduling or resource contention delays.
timeout_time | maximum time point to block until |
begin | iterator to futures to wait |
end | iterator to futures to wait |
Definition at line 42 of file wait_until.hpp.
References MakeContract().
|
noexcept |
Wait until specified time has been reached or Ready becomes true.
The behavior is undefined if Valid is false before the call to this function. This function may block for longer than until after timeout_time has been reached due to scheduling or resource contention delays.
timeout_time | maximum time point to block until |
begin | iterator to futures to wait |
count | of futures to wait |
Definition at line 61 of file wait_until.hpp.
References MakeContract().
|
noexcept |
Wait until specified time has been reached or Ready becomes true.
The behavior is undefined if Valid is false before the call to this function. This function may block for longer than until after timeout_time has been reached due to scheduling or resource contention delays.
timeout_time | maximum time point to block until |
fs | futures to wait |
Definition at line 23 of file wait_until.hpp.
References MakeContract(), and YACLIB_ASSERT.
auto yaclib::WhenAll | ( | FutureBase< V, E > &&... | futures | ) |
Create Future which will be ready when all futures are ready.
V | type of value all passed futures |
E | type of error all passed futures |
futures | two or more futures to combine |
Definition at line 66 of file when_all.hpp.
References Error, LastFail, yaclib::detail::AllCombinator< O, R, E >::Make(), MakeContract(), and yaclib::detail::WhenImpl().
YACLIB_INLINE auto yaclib::WhenAll | ( | It | begin, |
It | end | ||
) |
Create Future which will be ready when all futures are ready.
It | type of passed iterator |
T | type of all passed futures |
begin,end | the range of futures to combine |
Definition at line 49 of file when_all.hpp.
References LastFail, and MakeContract().
auto yaclib::WhenAll | ( | It | begin, |
std::size_t | count | ||
) |
Create Future which will be ready when all futures are ready.
It | type of passed iterator |
T | type of all passed futures |
begin,count | the range of futures to combine |
Definition at line 27 of file when_all.hpp.
References LastFail, yaclib::detail::AllCombinator< O, R, E >::Make(), MakeContract(), yaclib::detail::WhenImpl(), and YACLIB_WARN.
auto yaclib::WhenAny | ( | FutureBase< V, E > &&... | futures | ) |
Create Future that is ready when any of futures is ready.
P | policy WhenAny errors |
V | type of value all passed futures |
E | type of error all passed futures |
futures | two or more futures to combine |
Definition at line 69 of file when_any.hpp.
References MakeContract(), and yaclib::detail::WhenImpl().
YACLIB_INLINE auto yaclib::WhenAny | ( | It | begin, |
It | end | ||
) |
Create Future that is ready when any of futures is ready.
P | policy WhenAny errors |
It | type of passed iterator |
T | type of all passed futures |
begin,end | the range of futures to combine |
Definition at line 52 of file when_any.hpp.
References MakeContract().
auto yaclib::WhenAny | ( | It | begin, |
std::size_t | count | ||
) |
Create Future that is ready when any of futures is ready.
P | policy WhenAny errors |
It | type of passed iterator |
T | type of all passed futures |
begin,count | the range of futures to combine |
Definition at line 26 of file when_any.hpp.
References yaclib::detail::AnyCombinator< V, E, P >::Make(), MakeContract(), yaclib::detail::WhenImpl(), and YACLIB_WARN.
yaclib::YACLIB_DEFINE_VOID_TYPE | ( | StopTag | ) |
yaclib::YACLIB_DEFINE_VOID_TYPE | ( | Unit | ) |
|
noexcept |
Instead of.
or
you can write auto& executor = co_await yaclib::Yield();
Definition at line 59 of file current_executor.hpp.
|
inlineconstexpr |
Definition at line 86 of file type_traits.hpp.
Definition at line 41 of file type_traits.hpp.
|
inlineconstexpr |
Definition at line 20 of file type_traits.hpp.
|
inlineconstexpr |
Definition at line 26 of file type_traits.hpp.
Definition at line 46 of file type_traits.hpp.
|
inlineconstexpr |
Definition at line 51 of file type_traits.hpp.
Definition at line 55 of file type_traits.hpp.
Definition at line 61 of file type_traits.hpp.
|
inlineconstexpr |