|
Zth (libzth)
|
The class that manages the fibers within this thread. More...
#include <worker.h>
Public Types | |
| typedef Load | Load_type |
Public Types inherited from zth::ThreadLocalSingleton< Worker > | |
| typedef Worker | singleton_type |
Alias of the T template parameter. More... | |
Public Member Functions | |
| Worker () | |
| virtual | ~Worker () override |
| Fiber * | currentFiber () const noexcept |
| Waiter & | waiter () noexcept |
| void | add (Fiber *fiber) noexcept |
| Worker & | operator<< (Fiber *fiber) noexcept |
| void | contextSwitchEnable (bool enable=true) noexcept |
| void | contextSwitchDisable () noexcept |
| bool | contextSwitchEnabled () const noexcept |
| void | release (Fiber &fiber) noexcept |
| bool | schedule (Fiber *preferFiber=nullptr, Timestamp const &now=Timestamp::now()) |
| void | cleanup (Fiber &fiber) |
| void | suspend (Fiber &fiber) |
| void | resume (Fiber &fiber) noexcept |
| Timestamp const & | runEnd () const noexcept |
| void | run (TimeInterval const &duration=TimeInterval()) |
| Load_type & | load () noexcept |
| Load_type const & | load () const noexcept |
Public Member Functions inherited from zth::UniqueID< Worker > | |
| UniqueID (UniqueID const &)=delete | |
| UniqueID (UniqueID &&u) noexcept | |
| UniqueID (string const &name) | |
| UniqueID (string &&name) | |
| UniqueID (char const *name=nullptr) | |
| UniqueID & | operator= (UniqueID const &)=delete |
| UniqueID & | operator= (UniqueID &&u) noexcept |
| virtual | ~UniqueID ()=default |
| void const * | normptr () const noexcept |
| uint64_t | id () const noexcept |
| string const & | name () const noexcept |
| void | setName (string const &name) |
| void | setName (char const *name) |
| void | setName (string &&name) |
| virtual char const * | id_str () const override |
Protected Member Functions | |
| bool | isInWorkerContext () const noexcept |
| void | dbgStats () noexcept |
Protected Member Functions inherited from zth::UniqueIDBase | |
| virtual | ~UniqueIDBase ()=default |
Protected Member Functions inherited from zth::ThreadLocalSingleton< Worker > | |
| ThreadLocalSingleton () | |
| Constructor. More... | |
| ~ThreadLocalSingleton () | |
| Destructor. More... | |
Static Protected Member Functions | |
| static void | dummyWorkerEntry (void *) |
Friends | |
| void | worker_global_init () |
Additional Inherited Members | |
Static Public Member Functions inherited from zth::UniqueID< Worker > | |
| static uint64_t | getID () noexcept |
Static Public Member Functions inherited from zth::ThreadLocalSingleton< Worker > | |
| static safe_ptr< singleton_type >::type | instance () noexcept |
Return the only instance of T within this thread. More... | |
The class that manages the fibers within this thread.
| typedef Load zth::Worker::Load_type |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestaticprotected |
|
inlineprotectednoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
|
friend |
Definition at line 34 of file worker.cpp.