Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update me->tail with a single assignment operation. #4

Closed
wants to merge 1 commit into from

Conversation

armarpc
Copy link

@armarpc armarpc commented May 10, 2021

This makes it more likely that updating the tail will be done atomically.

…re likely that updating the tail will be made atomically.
@armarpc
Copy link
Author

armarpc commented May 15, 2021

Actually, achieving thread safety is harder than I thought. cbufer_poll reads the tail variable (by calling cbuf_is_empty) so there's still a race condition there. I'm closing this issue.

@armarpc armarpc closed this May 15, 2021
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.

None yet

1 participant