SOLA
Loading...
Searching...
No Matches
Public Member Functions | List of all members
solanet::Queue< T > Class Template Reference

#include <queue.h>

Public Member Functions

void push (const T &value)
 
void stop ()
 
pop ()
 

Detailed Description

template<typename T>
class solanet::Queue< T >

Thread-safe queue with blocking pop

Member Function Documentation

◆ pop()

template<typename T >
T solanet::Queue< T >::pop ( )
inline

Pops and returns the first element in the queue. Blocks as long the queue is empty or stop/destructor was called. If stop/destructor was called an empty message will be returned

Returns
first element in the queue or empty message if queue was stopped.

◆ push()

template<typename T >
void solanet::Queue< T >::push ( const T &  value)
inline

Push message to queue

Parameters
valuenew message

◆ stop()

template<typename T >
void solanet::Queue< T >::stop ( )
inline

Unblock blocking pop() call. Every call to pop() after calling stop() will directly return an empty message.


The documentation for this class was generated from the following file: