Boost logo

Boost :

Subject: [boost] Blocking Queue implementation in C++
From: Filip Klasson (filkl784_at_[hidden])
Date: 2009-03-06 03:45:08


Hi,

I need to create a Blocking queue implementation in *C++* with the help of
Boost libraries and i am looking for some advise.
What i need is a queue with linked nodes. The queue needs to be ordered as
FIFO (first-in-first-out).

I need the following functionality (Functionality from BlockingQueue
implementation in Java)
INSERT: Insert new items into the queue and if there is no space the queue
needs to wait until space is available.
RETRIEVE: Retrieve and removes the element that has waited the longest. If
there is no elements in the queue it waits until an element becomes
available.
SIZE: Return the number of elements in the queue.
POLL: The same as retrieve but only waits for a specified time for items to
become available.

I found a messageQueue that looks something like what i need (found here:
http://www.boost.org/doc/libs/1_36_0/boost/interprocess/ipc/message_queue.hpp),
is that correct?

/Filip


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk