
Hi: Has anyone written or does anyone know of a thread safe queue that uses boost to allow it to be cross platform? Cheers Sean.

On Tue, Jul 19, 2011 at 1:18 PM, Sean Farrow
Hi:
Has anyone written or does anyone know of a thread safe queue that uses boost to allow it to be cross platform?
Cheers
Sean.
What functionality are you looking for exactly? There is a review in process for the lock-free data structures library, which includes a lock-free fifo. Otherwise, I think your best bet is to wrap accesses to your std::queue with locks on a boost::mutex. If you want a priority_queue, something like the latter is probably your only option. Brian

HI Brian:
The lock free stuff should do the trick, I'll take a luck!
Sean.
-----Original Message-----
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Brian Budge
Sent: 19 July 2011 21:26
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] thread safe queue
On Tue, Jul 19, 2011 at 1:18 PM, Sean Farrow
Hi:
Has anyone written or does anyone know of a thread safe queue that uses boost to allow it to be cross platform?
Cheers
Sean.
What functionality are you looking for exactly? There is a review in process for the lock-free data structures library, which includes a lock-free fifo. Otherwise, I think your best bet is to wrap accesses to your std::queue with locks on a boost::mutex. If you want a priority_queue, something like the latter is probably your only option. Brian _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hi Sean, recently I wrote some code that you might be looking for, here it is: https://github.com/romanek-adam/boost_locking_queue it's based on the following article on implementing a thread-safe queue: http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-... it also uses some concepts from python's Queue class. WBR, Adam Romanek On 07/19/2011 10:18 PM, Sean Farrow wrote:
Hi:
Has anyone written or does anyone know of a thread safe queue that uses boost to allow it to be cross platform?
Cheers
Sean.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hi: Thanks adam that's sorted now. Cheers Sean. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Adam Romanek Sent: 20 July 2011 07:46 To: boost-users@lists.boost.org Subject: Re: [Boost-users] thread safe queue Hi Sean, recently I wrote some code that you might be looking for, here it is: https://github.com/romanek-adam/boost_locking_queue it's based on the following article on implementing a thread-safe queue: http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-... it also uses some concepts from python's Queue class. WBR, Adam Romanek On 07/19/2011 10:18 PM, Sean Farrow wrote:
Hi:
Has anyone written or does anyone know of a thread safe queue that uses boost to allow it to be cross platform?
Cheers
Sean.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Adam Romanek
-
Brian Budge
-
Sean Farrow