Re: [lock-free] Bounded MPMC queue exception safety

2016-11-08 Thread Dmitry Vyukov
On Sun, Nov 6, 2016 at 2:47 PM, Miral Mirality wrote: > On Monday, November 7, 2016 at 5:07:24 AM UTC+13, Dmitry Vyukov wrote: >> >> The best solution would be to require copying of elements to not >> throw. One way to achieve that is to create a copy of the element >> beforehand and then use movi

Re: [lock-free] Bounded MPMC queue exception safety

2016-11-06 Thread Miral Mirality
On Monday, November 7, 2016 at 5:07:24 AM UTC+13, Dmitry Vyukov wrote: > > The best solution would be to require copying of elements to not > throw. One way to achieve that is to create a copy of the element > beforehand and then use moving constructor to move it to the queue. > Move constructor

Re: [lock-free] Bounded MPMC queue exception safety

2016-11-06 Thread Dmitry Vyukov
On Thu, Nov 3, 2016 at 8:36 PM, Miral Mirality wrote: > Hi Dmitry, > > Pondering the bounded MPMC queue at > http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue > (very clever design, by the way, as I've said before). > > In the case where enqueue has made it all the way d

[lock-free] Bounded MPMC queue exception safety

2016-11-03 Thread Miral Mirality
Hi Dmitry, Pondering the bounded MPMC queue at http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue (very clever design, by the way, as I've said before). In the case where enqueue has made it all the way down to the copying of data_ (ie. found and reserved a cell, but