artdaq_core  v3_06_01
GlobalQueue.cc
1 #include "artdaq-core/Core/GlobalQueue.hh"
2 
3 namespace artdaq {
4 // In C++03, one would need to use boost::once_flag and
5 // boost::call_once to make sure that there is no race condition
6 // between threads for the creation of 'theQueue'.
7 // in C++11, this is thread-safe. See C++11 6.7p4.
8 
10 {
11  static RawEventQueue theQueue(maxSize);
12  return theQueue;
13 }
14 } // namespace artdaq
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:9
SequenceType::size_type SizeType
Type for indexes in sequence.