[boost.lockfree] spsc_queue read/write_available
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
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?
good eye, looks like i fat-fingered the doxygen string :/ of course read_available should be called from the consumer and write_available from the producer ... will fix this ...
Wow! Seems like a panic bugfix release of our software is due tomorrow. Thanks for responding so quickly! Kind regards, Philip Bennefall On 6/11/2015 5:53 PM, Tim Blechmann wrote:
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? good eye, looks like i fat-fingered the doxygen string :/
of course read_available should be called from the consumer and write_available from the producer ... will fix this ...
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost .
participants (2)
-
Philip Bennefall
-
Tim Blechmann