artdaq_core  v1_05_06
 All Classes Namespaces Functions
GlobalQueue.cc
1 #include "artdaq-core/Core/GlobalQueue.hh"
2 
3 namespace artdaq {
4 
5  // In C++03, one would need to use boost::once_flag and
6  // boost::call_once to make sure that there is no race condition
7  // between threads for the creation of 'theQueue'.
8  // in C++11, this is thread-safe. See C++11 6.7p4.
9 
10  RawEventQueue & getGlobalQueue(SizeType maxSize)
11  {
12  static RawEventQueue theQueue(maxSize);
13  return theQueue;
14  }
15 
16 }