8#if !defined(HPP_AWORX_ALIB_THREADS_MODEL_THREADMANAGER)
14namespace alib::threads::model {
16TRequest::TRequest(
void *pData)
24 sem_init(&event, 0, 0);
31 if (sem_destroy(&event)==-1 && errno==EBUSY)
35void TRequest::setProcessed()
41bool TRequest::isProcessed()
47 sem_getvalue(&event, &retVal);
53bool TRequest::waitUntilProcessed(
int millisecs)
62 breakTime+= Ticks::Duration::FromAbsoluteMilliseconds( millisecs );
66 while (sem_trywait(&event) == -1 && errno == EAGAIN)
70 Thread::SleepMicros( (breakTime - now).InAbsoluteMicroseconds() );
#define ALIB_MESSAGE(...)
#define ALIB_CALLER_PRUNED
time::Ticks Ticks
Type alias in namespace alib.