artdaq_core
v3_01_04
Main Page
Related Pages
Namespaces
Classes
Files
File List
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
(
RawEventQueue::SizeType
maxSize)
11
{
12
static
RawEventQueue
theQueue(maxSize);
13
return
theQueue;
14
}
15
}
artdaq::ConcurrentQueue
Definition:
ConcurrentQueue.hh:417
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:10
artdaq::ConcurrentQueue::SizeType
SequenceType::size_type SizeType
Type for indexes in sequence.
Definition:
ConcurrentQueue.hh:422
src
artdaq-core
Core
GlobalQueue.cc
Generated on Tue Feb 6 2018 09:38:33 for artdaq_core by
1.8.5