]> git.mxchange.org Git - simgear.git/commit
Make SGLockingQueue::pop usable.
authorJames Turner <zakalawe@mac.com>
Sun, 25 Nov 2012 22:36:15 +0000 (22:36 +0000)
committerJames Turner <zakalawe@mac.com>
Sun, 25 Nov 2012 22:36:15 +0000 (22:36 +0000)
commit7d8d4a03fbcbc08921626d7b4698fec11e0aacdd
tree79ab7f8ca46eec8f3742459bc803532ff02f5e2b
parent1a68d34663592658c0688c379751fd066fe73dab
Make SGLockingQueue::pop usable.

Since there's no external lock, it was impossible to check the queue was non-empty before a pop, without a race condition. To avoid this, tolerate an empty queue and return a default constructed value.
simgear/threads/SGQueue.hxx