00001 #include "artdaq-core/Core/GlobalQueue.hh" 00002 00003 namespace artdaq { 00004 00005 // In C++03, one would need to use boost::once_flag and 00006 // boost::call_once to make sure that there is no race condition 00007 // between threads for the creation of 'theQueue'. 00008 // in C++11, this is thread-safe. See C++11 6.7p4. 00009 00010 RawEventQueue & getGlobalQueue(SizeType maxSize) 00011 { 00012 static RawEventQueue theQueue(maxSize); 00013 return theQueue; 00014 } 00015 00016 }