YACLib
C++ library for concurrent tasks execution
|
#include <executor.hpp>
Public Types | |
enum class | Type : unsigned char { Custom = 0 , Inline = 1 , Manual = 2 , Strand = 3 , SingleThread = 4 , FairThreadPool = 5 , GolangThreadPool = 6 } |
Public Member Functions | |
virtual Type | Tag () const noexcept=0 |
Return type of this executor. | |
virtual bool | Alive () const noexcept=0 |
Return true if executor still alive, that means job passed to submit will be Call. | |
virtual void | Submit (Job &job) noexcept=0 |
Submit given job. | |
Public Member Functions inherited from yaclib::IRef | |
virtual void | IncRef () noexcept |
Increments reference counter. | |
virtual void | DecRef () noexcept |
Decrements reference counter. | |
virtual | ~IRef () noexcept=default |
Definition at line 8 of file executor.hpp.
|
strong |
Enumerator | |
---|---|
Custom | |
Inline | |
Manual | |
Strand | |
SingleThread | |
FairThreadPool | |
GolangThreadPool |
Definition at line 23 of file executor.hpp.
Return true if executor still alive, that means job passed to submit will be Call.
Implemented in yaclib::ManualExecutor, yaclib::Strand, and yaclib::FairThreadPool.
Referenced by yaclib::Strand::Alive().
Submit given job.
This method may either Call or Drop the job
This method increments reference counter if task is submitted.
Call if executor is Alive, otherwise Drop
job | job to execute |
Implemented in yaclib::ManualExecutor, yaclib::Strand, and yaclib::FairThreadPool.
Referenced by yaclib::detail::MutexImpl< FIFO, Batching >::AwaitUnlockOn(), and yaclib::detail::MutexImpl< FIFO, Batching >::UnlockHereAwait().
Return type of this executor.
Implemented in yaclib::ManualExecutor, yaclib::Strand, and yaclib::FairThreadPool.