Introducing - the check if a thread queue might have data. Without locks. Who needs those anyways.

This commit is contained in:
Bernhard Amann 2012-03-26 19:53:01 -07:00
parent 355b85fcd7
commit 3405cbdfbd
3 changed files with 17 additions and 0 deletions

View file

@ -261,6 +261,12 @@ private:
*/
bool HasOut() { return queue_out.Ready(); }
/**
* Returns true if there might be at least one message pending for the main
* thread.
*/
bool MightHaveOut() { return queue_out.MaybeReady(); }
Queue<BasicInputMessage *> queue_in;
Queue<BasicOutputMessage *> queue_out;