|
Boost : |
Subject: [boost] [boost.lockfree] spsc_queue read/write_available
From: Philip Bennefall (philip_at_[hidden])
Date: 2015-06-11 11:09:37
Hi all,
I am debugging a crash that I am getting inside of the pop method in
spsc_queue from boost.lockfree. I am not sure exactly what is happening
yet, but I do have one question. I call read_available and
write_available a few times, and am wondering why read_available can
only be called from the producer thread and why write_available can only
be called from the consumer thread? Wouldn't it make sense to call
read_available from the consumer, and write_available from the producer?
Why is it the other way around? Currently I call write_available from
the thread that pops, and read_available from the thread that pushes.
Did I interpret the documentation correctly? If so, some clarifications
would be much appreciated.
Thanks!
Kind regards,
Philip Bennefall
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk