The changes in this pull request address concurrent read scenarios by introducing an AsyncLock to both the Reader and Consumer classes. The receive loop within these classes is now synchronized using this lock, ensuring proper management of concurrent reads. Additionally, the lock object is disposed during the disposal of the respective classes.
Testing
I manually verified that the Receive methods in the Reader and Consumer classes are now thread-safe, as expected.
Fixes #211 #208
Description
The changes in this pull request address concurrent read scenarios by introducing an
AsyncLock
to both theReader
andConsumer
classes. The receive loop within these classes is now synchronized using this lock, ensuring proper management of concurrent reads. Additionally, the lock object is disposed during the disposal of the respective classes.Testing
I manually verified that the
Receive
methods in theReader
andConsumer
classes are now thread-safe, as expected.