artdaq_core
v3_05_07
Return to top level
Main Page
Related Pages
Namespaces
Classes
Files
File List
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
9
RawEventQueue
&
getGlobalQueue
(
RawEventQueue::SizeType
maxSize)
10
{
11
static
RawEventQueue
theQueue(maxSize);
12
return
theQueue;
13
}
14
}
// namespace artdaq
artdaq::ConcurrentQueue
Definition:
ConcurrentQueue.hh:402
artdaq::getGlobalQueue
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
artdaq::ConcurrentQueue::SizeType
SequenceType::size_type SizeType
Type for indexes in sequence.
Definition:
ConcurrentQueue.hh:407
src
artdaq-core
Core
GlobalQueue.cc
Generated on Wed Oct 9 2019 12:44:47 for artdaq_core by
1.8.5