aalhour / C-Sharp-Algorithms

:books: :chart_with_upwards_trend: Plug-and-play class-library project of standard Data Structures and Algorithms in C#
MIT License
5.91k stars 1.4k forks source link

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

Open xuanyuan5005 opened 1 year ago

xuanyuan5005 commented 1 year ago

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[bot] commented 1 year ago

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

hoowee commented 1 year ago

您好,您的邮件我已经收到,会尽快处理,谢谢!中建八局设计管理总院 胡伟