58 const std::type_info&
ID;
62 Job(
const std::type_info&
id )
99 template<
typename TOther>
100 bool Is() {
return ID ==
typeid(TOther); }
105 template<
typename TOther>
115 template<
typename TJob>
120 " Requested type: <{}>", &
ID, &
typeid(TJob) )
122 auto* result=
dynamic_cast<TJob*
>(
this);
125 "Job casting failed.\n"
127 " Requested type: <{}>", &
ID, &
typeid(TJob) )
138 virtual bool Do() {
return false; }
#define ALIB_ASSERT_ERROR(cond, domain,...)
void DbgOmitDestructionWarning()
Promise()
Default constructor.
Priority
Possible priorities of jobs assigned to an #"DedicatedWorker".
@ DeferredDeletion
As the name indicates.
@ Low
As the name indicates.
@ Highest
As the name indicates.
@ High
As the name indicates.
@ Lowest
As the name indicates.
@ Standard
As the name indicates.
threadmodel::JPromise JPromise
Type alias in namespace #"%alib".
threadmodel::Job Job
Type alias in namespace #"%alib".
A simple encapsulated promise.
virtual ~JPromise() override=default
Virtual destructor.
virtual size_t SizeOf() override
virtual void PrepareDeferredDeletion() override
JPromise(const std::type_info &id)
virtual void PrepareDeferredDeletion()
const std::type_info & ID
Job(const std::type_info &id)
virtual ~Job()=default
Protected destructor.