Skip to content

Conversation

@bitfaster
Copy link
Owner

@bitfaster bitfaster commented Dec 4, 2023

The read and write buffer are both mp-sc (single consumer) - it is only valid for 1 thread to deque. Prior change switched from Clear allocating a new buffer to TryTake until empty.

Clearing the buffers must be protected by the maintenance lock, otherwise two threads can effectively dequeue - this situation is provoked by a test causing the build to hang intermittently.

@coveralls
Copy link

coveralls commented Dec 4, 2023

Coverage Status

coverage: 99.178% (-0.06%) from 99.237%
when pulling 28121ca on users/alexpeck/fixclear
into 4201887 on main.

@bitfaster bitfaster marked this pull request as ready for review December 4, 2023 02:58
@bitfaster bitfaster merged commit dad77db into main Dec 4, 2023
@bitfaster bitfaster deleted the users/alexpeck/fixclear branch December 4, 2023 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants