FACT++  1.0
template<class T, class List = std::list<T>>
bool Queue< T, List >::post ( const T &  val)
inline

Definition at line 230 of file Queue.h.

Referenced by mainloop(), Queue< pair< Time, GUI_STAT > >::post(), procEvt(), and writeEvt().

231  {
232  const std::lock_guard<std::mutex> lock(fMutex);
233  if (fState==kPrompt)
234  return fCallback(val);
235 
236  if (fState==kIdle)
237  return false;
238 
239  fList.push_back(val);
240  fSize++;
241 
242  fCond.notify_one();
243 
244  return true;
245  }
List fList
Definition: Queue.h:32
state_t fState
Definition: Queue.h:48
callback fCallback
Definition: Queue.h:51
std::condition_variable fCond
Definition: Queue.h:35
std::mutex fMutex
Definition: Queue.h:34
size_t fSize
Definition: Queue.h:30

+ Here is the caller graph for this function: