PrevUpHomeNext

Class template queue_front

boost::pipeline::queue_front

Synopsis

// In header: <boost/pipeline/queue.hpp>

template<typename T> 
class queue_front {
public:
  // types
  typedef queue< T >::value_type value_type;

  // construct/copy/destruct
  queue_front(queue< T > &);

  // public member functions
  bool wait_pull(T &);
  bool is_empty() const;
  bool is_closed() const;
};

Description

Consumer handle to a buffer queue between segments.

Each transformation consuming multiple items on each call receive a queue_front instance which is used to access to the upstream queue.

A handle is valid until the segment which owns the input queue terminates.

Template arguments:

  • T Value type of the underlying queue

queue_front public types

  1. typedef queue< T >::value_type value_type;

    Value type of the underlying queue

queue_front public construct/copy/destruct

  1. queue_front(queue< T > & queue);

    Creates a handle to the given queue.

    The constructed object does not take ownership of the give queue.

queue_front public member functions

  1. bool wait_pull(T & ret);

    Pulls the front item of the queue.

    Blocks until an item becomes available or the underlying queue gets closed.

    Parameters:

    ret

    Pulled item, if any

    Returns:

    true, if pulled successfully, false otherwise (queue is closed)

  2. bool is_empty() const;

    Checks the underlying queue for emptiness.

    This call is subject to race.

    Returns:

    true, if the queue was empty, false otherwise

  3. bool is_closed() const;

    Checks whether the underlying queue is closed.

    Returns:

    true, if the queue is closed, false otherwise


PrevUpHomeNext