Permalink
Browse files

Revert "Added support for kicking out listeners to the SafeQueue with…

… .empty"

This reverts commit f8258174a6c44137242f12ca3fd6ae57246c871b.
  • Loading branch information...
1 parent 38bb7df commit 98ca15de3c3e66a75a92681ba4dddd42d5150519 @taxilian taxilian committed Mar 30, 2012
Showing with 1 addition and 9 deletions.
  1. +1 −9 src/ScriptingCore/SafeQueue.h
@@ -61,8 +61,6 @@ namespace FB {
{
boost::mutex::scoped_lock lock(the_mutex);
return the_queue.empty();
- lock.unlock();
- the_condition_variable.notify_one();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -126,20 +124,14 @@ namespace FB {
///
/// @param [out] popped_value The popped value.
////////////////////////////////////////////////////////////////////////////////////////////////////
- bool wait_and_pop(Data& popped_value)
+ void wait_and_pop(Data& popped_value)
{
boost::mutex::scoped_lock lock(the_mutex);
while(the_queue.empty())
{
the_condition_variable.wait(lock);
}
- // See if a value was added; if not, we may have been kicked out by a call to empty()
- if(the_queue.empty())
- {
- return false;
- }
-
popped_value=the_queue.front();
the_queue.pop();
}

0 comments on commit 98ca15d

Please sign in to comment.