okay... found a workaround! Conditional should do this! (at least on a POSIX system)... however it would be nice if Mutex implemented EnterMutex(timeout_t timeout=0)...
(or maybe TryEnterMutex(timeout_t timeout=0)), since one has to consider the usage of a conditional, although a mutex is sufficient, bad hackery.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
just wondering how I could implement an algorithm that waits on a Mutex/Semaphore only for ... say 10 seconds and then goes on.
Most accuratly it could be described as a tryEnterMutex/tryWait() with a timeout :-)
okay... found a workaround! Conditional should do this! (at least on a POSIX system)... however it would be nice if Mutex implemented EnterMutex(timeout_t timeout=0)...
(or maybe TryEnterMutex(timeout_t timeout=0)), since one has to consider the usage of a conditional, although a mutex is sufficient, bad hackery.