YACLib
C++ library for concurrent tasks execution
|
Namespaces | |
namespace | fiber |
namespace | thread |
Typedefs | |
template<CoreType Type, typename V , typename E > | |
using | ResultCoreT = std::conditional_t< Type==CoreType::Detach, NoResultCore, ResultCore< V, E > > |
template<typename V , typename E > | |
using | ResultCorePtr = IntrusivePtr< ResultCore< V, E > > |
template<bool Single> | |
using | AwaitOnCounterT = std::conditional_t< Single, OneCounter< NopeBase, NopeDeleter >, AtomicCounter< NopeBase, NopeDeleter > > |
using | DefaultEvent = MutexEvent |
Enumerations | |
enum class | CoreType : unsigned char { Run = 0 , Then = 1 , Detach = 2 } |
enum class | CallbackType : unsigned char { Inline = 0 , On = 1 , InlineOn = 2 , LazyInline = 3 , LazyOn = 4 } |
enum | WaitStatus { Timeout , Ready } |
enum class | LogLevel : unsigned char { Debug = 0 , Warn = 1 , Count = 3 } |
Variables | |
static std::uint32_t | sAtomicFailFrequency = 13 |
static std::uint32_t | sYieldFrequency = 16 |
static std::uint32_t | sSleepTime = 100 |
static std::uint64_t | sInjectedCount = 0 |
static std::uint32_t | sSeed = 1239 |
static thread_local std::mt19937_64 | eng {sSeed} |
static std::array< LogCallback, static_cast< std::size_t >(LogLevel::Count)> | sCallbacks = {} |
using yaclib::detail::AwaitOnCounterT = typedef std::conditional_t<Single, OneCounter<NopeBase, NopeDeleter>, AtomicCounter<NopeBase, NopeDeleter> > |
Definition at line 13 of file await_on_awaiter.hpp.
Definition at line 16 of file default_event.hpp.
Definition at line 64 of file result_core.hpp.
using yaclib::detail::ResultCoreT = typedef std::conditional_t<Type == CoreType::Detach, NoResultCore, ResultCore<V, E> > |
|
strong |
|
strong |
|
strong |
Enumerator | |
---|---|
Timeout | |
Ready |
Definition at line 5 of file wait_status.hpp.
|
constexpr |
Definition at line 12 of file condition_variable.cpp.
References yaclib::MakeContract().
|
constexpr |
Definition at line 5 of file condition_variable.cpp.
References yaclib::MakeContract(), and Ready.
Referenced by yaclib::detail::ConditionVariable< Impl >::wait_for(), and yaclib::detail::ConditionVariable< Impl >::wait_until().
void yaclib::detail::ForwardToRandCount | ( | std::uint64_t | random_count | ) |
Definition at line 37 of file util.cpp.
References GetRandNumber(), and yaclib::MakeContract().
Referenced by yaclib::fiber::ForwardToFaultRandomCount().
std::uint64_t yaclib::detail::GetRandCount | ( | ) |
Definition at line 29 of file util.cpp.
References yaclib::MakeContract().
Referenced by yaclib::fiber::GetFaultRandomCount().
std::uint64_t yaclib::detail::GetRandNumber | ( | std::uint64_t | max | ) |
Definition at line 22 of file util.cpp.
References eng, and yaclib::MakeContract().
Referenced by ForwardToRandCount(), yaclib::detail::Injector::MaybeInject(), yaclib::detail::fiber::PollRandomElementFromList(), ShouldFailAtomicWeak(), yaclib::fault::Scheduler::SleepPreemptive(), and yaclib::detail::fiber::SharedMutex::unlock().
std::uint32_t yaclib::detail::GetSeed | ( | ) |
Definition at line 18 of file util.cpp.
References sSeed.
Referenced by yaclib::detail::thread::RandomDevice::reset().
|
noexcept |
Definition at line 10 of file log.cpp.
References yaclib::MakeContract(), and sCallbacks.
|
noexcept |
Definition at line 69 of file base_core.hpp.
References yaclib::MakeContract().
Referenced by yaclib::detail::Destroy::await_suspend(), yaclib::detail::TransferAwaiter::await_suspend(), yaclib::detail::TransferSingleAwaiter< V, E >::await_suspend(), yaclib::detail::ReadyCore< V, E >::Call(), yaclib::Promise< V, E >::Set(), SetCallback(), WhenSetResult(), yaclib::detail::AllCombinator< O, R, E >::~AllCombinator(), yaclib::detail::AllCombinator< OrderPolicy::Same, R, E >::~AllCombinator(), and yaclib::detail::AnyCombinatorBase< V, E, FailPolicy::FirstFail >::~AnyCombinatorBase().
Definition at line 281 of file core.hpp.
References Detach, yaclib::MakeContract(), and Run.
|
noexcept |
Definition at line 29 of file result_core.cpp.
References yaclib::MakeContract().
Referenced by yaclib::FutureBase< V, E >::Detach(), yaclib::Task< V, E >::Detach(), yaclib::Task< V, E >::Detach(), and SetCallback().
Definition at line 32 of file unique_job.hpp.
References yaclib::MakeContract().
Referenced by yaclib::Submit().
|
noexcept |
Definition at line 36 of file core.hpp.
References yaclib::MakeContract(), yaclib::detail::Node::next, and YACLIB_ASSERT.
Referenced by yaclib::detail::TransferAwaiter::await_suspend(), yaclib::detail::TransferSingleAwaiter< V, E >::await_suspend(), Start(), and Start().
|
noexcept |
Definition at line 35 of file inline_core.hpp.
References yaclib::MakeContract(), and yaclib_std::noop_coroutine().
YACLIB_INLINE auto yaclib::detail::Run | ( | IExecutor & | e, |
Func && | f | ||
) |
Definition at line 14 of file run.hpp.
References yaclib::MakeContract().
YACLIB_INLINE auto yaclib::detail::Schedule | ( | IExecutor & | e, |
Func && | f | ||
) |
Definition at line 9 of file schedule.hpp.
References yaclib::MakeContract().
void yaclib::detail::SetAtomicWeakFailFrequency | ( | std::uint32_t | k | ) |
Definition at line 16 of file atomic.cpp.
References yaclib::MakeContract(), and sAtomicFailFrequency.
Referenced by yaclib::SetAtomicFailFrequency().
|
noexcept |
Definition at line 17 of file log.cpp.
References yaclib::MakeContract(), and sCallbacks.
auto yaclib::detail::SetCallback | ( | ResultCorePtr< Arg, E > & | core, |
IExecutor * | executor, | ||
Func && | f | ||
) |
Definition at line 304 of file core.hpp.
References Detach, Inline, LazyInline, LazyOn, Loop(), yaclib::MakeContract(), MakeDrop(), On, yaclib::detail::BaseCore::SetInline(), yaclib::detail::BaseCore::StoreCallback(), and YACLIB_ASSERT.
Referenced by yaclib::detail::BaseCore::CallInline(), and yaclib::detail::BaseCore::SetInline().
void yaclib::detail::SetSeed | ( | std::uint32_t | new_seed | ) |
Definition at line 13 of file util.cpp.
References eng, yaclib::MakeContract(), and sSeed.
Referenced by yaclib::SetSeed().
bool yaclib::detail::ShouldFailAtomicWeak | ( | ) |
Definition at line 11 of file atomic.cpp.
References GetRandNumber(), yaclib::MakeContract(), and sAtomicFailFrequency.
Referenced by yaclib::detail::AtomicBase< Impl, T >::compare_exchange_weak(), yaclib::detail::AtomicBase< Impl, T >::compare_exchange_weak(), yaclib::detail::AtomicBase< Impl, T >::compare_exchange_weak(), and yaclib::detail::AtomicBase< Impl, T >::compare_exchange_weak().
Definition at line 12 of file task_impl.cpp.
References yaclib::MakeContract(), and MoveToCaller().
Definition at line 6 of file task_impl.cpp.
References yaclib::MakeContract(), and MoveToCaller().
Referenced by yaclib::Task< V, E >::Detach(), yaclib::Task< V, E >::Detach(), yaclib::Task< V, E >::ToFuture(), and yaclib::Task< V, E >::ToFuture().
|
noexcept |
Definition at line 23 of file inline_core.hpp.
References yaclib::MakeContract().
|
constexprnoexcept |
Definition at line 236 of file core.hpp.
References yaclib::MakeContract().
Definition at line 50 of file wait_impl.hpp.
References yaclib::MakeContract().
|
externnoexcept |
|
externnoexcept |
|
noexcept |
Definition at line 62 of file wait_impl.hpp.
References yaclib::MakeContract(), and YACLIB_ASSERT.
|
noexcept |
Definition at line 20 of file wait_impl.hpp.
References yaclib::MakeContract().
|
noexcept |
Definition at line 22 of file when_impl.hpp.
References yaclib::MakeContract(), and YACLIB_ASSERT.
|
noexcept |
Definition at line 13 of file when_impl.hpp.
References yaclib::MakeContract(), and YACLIB_ASSERT.
Referenced by yaclib::WhenAll(), yaclib::WhenAll(), yaclib::WhenAny(), and yaclib::WhenAny().
Definition at line 29 of file when_impl.hpp.
References Loop(), and yaclib::MakeContract().
|
static |
Definition at line 11 of file util.cpp.
Referenced by GetRandNumber(), and SetSeed().
|
static |
Definition at line 9 of file atomic.cpp.
Referenced by SetAtomicWeakFailFrequency(), and ShouldFailAtomicWeak().
|
static |
Definition at line 8 of file log.cpp.
Referenced by LogMessage(), and SetCallback().
|
static |
Definition at line 11 of file injector.cpp.
Referenced by yaclib::detail::Injector::GetInjectedCount(), and yaclib::detail::Injector::MaybeInject().
|
static |
|
static |
Definition at line 10 of file injector.cpp.
Referenced by yaclib::detail::Injector::GetSleepTime(), yaclib::detail::Injector::MaybeInject(), and yaclib::detail::Injector::SetSleepTime().
|
static |
Definition at line 9 of file injector.cpp.
Referenced by yaclib::detail::Injector::SetFrequency().