libzmq icon indicating copy to clipboard operation
libzmq copied to clipboard

Remove unnecessary variable ypipe_conflate_t::reader_awake

Open alokpr opened this issue 3 years ago • 1 comments

This variable is not necessary because the only possible value is "false". This variable also had data race reported by TSAN.

Fixes zeromq/libzmq#4369

alokpr avatar Apr 15 '22 17:04 alokpr

@bluca can you please review the PR?

alokpr avatar May 05 '22 15:05 alokpr

This change looks good to me, however the comment above flush probably needs tweaking as well:

    //  Flush is no-op for conflate ypipe. Reader asleep behaviour
    //  is as of the usual ypipe.
    //  Returns false if the reader thread is sleeping. In that case,
    //  caller is obliged to wake the reader up before using the pipe again.

mitchellwrosen avatar Mar 08 '23 20:03 mitchellwrosen

This variable also had data race reported by TSAN.

TSAN does not understand the complicated pipes sharing that is implemented here, I suggest to simply avoid running it

bluca avatar Oct 24 '23 10:10 bluca