I'm wondering if the synchronization-objects in Poco (especially Semaphore, Mutex and RWLock) resume the threads waiting on it in FIFO order (like explicitly stated on the docs of Condition). If this wouldn't be the case, it is probably possible to have starvation when RWLock is used and there are more readlocks invoked then writelocks, or am I all wrong here?
Also, when I tested the use of RWLock, I managed it to make it throw an exception that said "Unable to retrieve lock" (but not always, hence I thought that it was a threading issue, but this seems odd as RWLock is made for use in threading). (Note that I explicitly used writeLock and readLock and not tryWriteLock and tryReadLock, but I've thrown away the exact code appearantly.) Can anyone say why this could have happened?