|
YACLib
C++ library for concurrent tasks execution
|
#include <fiber_base.hpp>
Public Types | |
| using | Id = std::uint64_t |
Public Member Functions | |
| FiberBase () | |
| void | SetJoiningFiber (FiberBase *joining_fiber) noexcept |
| Id | GetId () const noexcept |
| void | Resume () |
| void | Suspend () |
| FiberState | GetState () noexcept |
| void | SetState (FiberState state) noexcept |
| void | SetThreadDead () noexcept |
| bool | IsThreadAlive () const noexcept |
| void * | GetTLS (std::uint64_t id, std::unordered_map< std::uint64_t, void * > &defaults) |
| void | SetTLS (std::uint64_t id, void *value) |
| virtual | ~FiberBase ()=default |
Public Member Functions inherited from yaclib::detail::fiber::Node | |
| bool | Erase () |
Static Public Member Functions | |
| static IStackAllocator & | GetAllocator () noexcept |
Protected Member Functions | |
| void | Start () |
| void | Exit () |
Protected Attributes | |
| ExecutionContext | _context {} |
| Stack | _stack |
| std::exception_ptr | _exception |
Additional Inherited Members | |
Public Attributes inherited from yaclib::detail::fiber::Node | |
| Node * | prev {this} |
| Node * | next {this} |
Definition at line 27 of file fiber_base.hpp.
| using yaclib::detail::fiber::FiberBase::Id = std::uint64_t |
Definition at line 29 of file fiber_base.hpp.
| yaclib::detail::fiber::FiberBase::FiberBase | ( | ) |
Definition at line 12 of file fiber_base.cpp.
|
virtualdefault |
|
protected |
Definition at line 42 of file fiber_base.cpp.
References _context, yaclib::detail::fiber::Completed, yaclib::detail::fiber::ExecutionContext::Exit(), and yaclib::detail::fiber::ScheduleFiber().
|
staticnoexcept |
Definition at line 78 of file fiber_base.cpp.
References yaclib::detail::fiber::sAllocator.
Referenced by yaclib::fiber::SetStackSize().
|
noexcept |
Definition at line 15 of file fiber_base.cpp.
Referenced by yaclib::detail::fiber::Thread::get_id(), and yaclib::fault::Scheduler::GetId().
|
noexcept |
Definition at line 50 of file fiber_base.cpp.
Referenced by yaclib::detail::fiber::Thread::join().
| void * yaclib::detail::fiber::FiberBase::GetTLS | ( | std::uint64_t | id, |
| std::unordered_map< std::uint64_t, void * > & | defaults | ||
| ) |
Definition at line 66 of file fiber_base.cpp.
References yaclib::MakeContract().
|
noexcept |
Definition at line 62 of file fiber_base.cpp.
| void yaclib::detail::fiber::FiberBase::Resume | ( | ) |
Definition at line 19 of file fiber_base.cpp.
References _context, _exception, yaclib::detail::fiber::Completed, yaclib::MakeContract(), yaclib::detail::fiber::Running, and yaclib::detail::fiber::ExecutionContext::SwitchTo().
Definition at line 54 of file fiber_base.cpp.
References yaclib::MakeContract().
Referenced by yaclib::detail::fiber::Thread::join().
|
noexcept |
Definition at line 82 of file fiber_base.cpp.
References yaclib::MakeContract().
Referenced by yaclib::fault::Scheduler::Schedule().
|
noexcept |
Definition at line 58 of file fiber_base.cpp.
Definition at line 74 of file fiber_base.cpp.
References yaclib::MakeContract().
|
protected |
Definition at line 38 of file fiber_base.cpp.
References _context, and yaclib::detail::fiber::ExecutionContext::Start().
Referenced by yaclib::detail::fiber::Fiber< Args >::Trampoline().
| void yaclib::detail::fiber::FiberBase::Suspend | ( | ) |
Definition at line 33 of file fiber_base.cpp.
References _context, yaclib::detail::fiber::Suspended, and yaclib::detail::fiber::ExecutionContext::SwitchTo().
|
protected |
Definition at line 61 of file fiber_base.hpp.
Referenced by Exit(), yaclib::detail::fiber::Fiber< Args >::Fiber(), Resume(), Start(), and Suspend().
|
protected |
Definition at line 63 of file fiber_base.hpp.
Referenced by Resume().
|
protected |
Definition at line 62 of file fiber_base.hpp.
Referenced by yaclib::detail::fiber::Fiber< Args >::Fiber().