FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
template<typename Data>
bool FB::SafeQueue< Data >::try_pop ( Data &  popped_value)
inline

Try to pop a value off the front of the queue; if the queue is empty returns false.

Parameters
[out]popped_valueThe popped value.
Returns
true if a value is returned, false if the queue was empty

Definition at line 75 of file SafeQueue.h.

Referenced by FB::ActiveX::ActiveXBrowserHost::DoDeferredRelease().

76  {
77  boost::mutex::scoped_lock lock(the_mutex);
78  if(the_queue.empty())
79  {
80  return false;
81  }
82 
83  popped_value=the_queue.front();
84  the_queue.pop();
85  return true;
86  }