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

DataStructures.Lists. CircularBuffer is not thread safe. #169

Open
xuanyuan5005 opened this issue Jan 28, 2023 · 2 comments
Open

DataStructures.Lists. CircularBuffer is not thread safe. #169

xuanyuan5005 opened this issue Jan 28, 2023 · 2 comments

Comments

@xuanyuan5005
Copy link

DataStructures.Lists. CircularBuffer
Now
1,CircularBuffer.Add used by Producer threads
2,CircularBuffer.Add.Pop used by Consumer threads

Producer and Consumer is two different threads,when write the _count at the same time, the Count is not the desired value !

@github-actions
Copy link

Thanks for supporting the development of C# Algorithms with your first issue! We look forward to handling it.

@hoowee
Copy link

hoowee commented Jan 28, 2023 via email

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

No branches or pull requests

2 participants