template<typename T>
class theplu::yat::utility::Queue< T >
Multi-thread safe queue.
This class provides a multi-thread safe queue. The Queue is typically shared by multiple threads such that some threads push elements and some pop elements. The Queue is a "first in first
out" container and holds the same functionality as the similar std::queue. The difference is that Queue is multi-thread safe, in other words, when one thread access the Queue, other threads are locked out from access so that only one thread touches the Queue at a time and its behaviour is well defined. In a single-thread application there is no point in using the class as std::queue should be prefereble.
- Note
- Copy constructor and assignment are available but they are not thread safe in the current implementation.
- Since
- New in yat 0.11
- See Also
- Boost Library provides a lock-free queue