TimeoutGuard's destructor calls Thread::cullEvent if the event did not fire when it goes out of scope.
However, cullEvent currently has a FATAL("cullEvent"); line in it, making it impossible to use TimeoutGuard properly. I'm not sure why it has this line, but I assume there's a good reason.
Failing code:
Semaphore sem(0);
{
TimeoutGuard guard(5);
if (!guard.timedOut())
NOTICE("Acquired sem");
}
NOTICE("Ended!");
for(;;);
If the semaphore acquire is not commented the timeout occurs as per normal, and there is no breakpoint.
TimeoutGuard's destructor calls Thread::cullEvent if the event did not fire when it goes out of scope.
However, cullEvent currently has a FATAL("cullEvent"); line in it, making it impossible to use TimeoutGuard properly. I'm not sure why it has this line, but I assume there's a good reason.
Failing code: Semaphore sem(0);
If the semaphore acquire is not commented the timeout occurs as per normal, and there is no breakpoint.