|
Boost Users : |
Subject: Re: [Boost-users] lockfree : getting a move only type into spsc_queue
From: Bjorn Reese (breese_at_[hidden])
Date: 2016-07-24 07:04:00
On 07/23/2016 11:36 PM, Thomas Novotny wrote:
> In the end Imade a custom version of spsc_queue. Getting this working
> (as a hack) was fairly easy, so I wanted to share it in the hope that a
> better solution might make it into a future version of the library.
FYI, there is a pull request about adding move support to spsc_queue,
but the consequences have not been fully examined yet:
https://github.com/boostorg/lockfree/pull/24
In the meanwhile, you can make a cleaner solution with a unique_ptr
specialization of spsc_queue. See attachment.
> bool push( T & t, T * buffer, size_t max_size )
T&& t
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net