artdaq_core  v1_07_04
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
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 
11  {
12  static RawEventQueue theQueue(maxSize);
13  return theQueue;
14  }
15 }
RawEventQueue & getGlobalQueue(RawEventQueue::SizeType maxSize)
The first thread to call getGlobalQueue() causes the creation of the queue. The queue will be destroy...
Definition: GlobalQueue.cc:10
SequenceType::size_type SizeType
Type for indexes in sequence.