mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
stream_muxer(yamux): add ReadWriteLock to YamuxStream to prevent concurrent read/write corruption
Introduce a read/write lock abstraction and integrate it into `YamuxStream` so that simultaneous reads and writes do not interleave, eliminating potential data corruption and race conditions. Major changes: - Abstract `ReadWriteLock` into its own util module - Integrate locking into YamuxStream for `write` operations - Ensure tests pass for lock correctness - Fix lint & type issues discovered during review Closes #793
This commit is contained in:
6
newsfragments/897.bugfix.rst
Normal file
6
newsfragments/897.bugfix.rst
Normal file
@ -0,0 +1,6 @@
|
||||
enhancement: Add write lock to `YamuxStream` to prevent concurrent write race conditions
|
||||
|
||||
- Implements ReadWriteLock for `YamuxStream` write operations
|
||||
- Prevents data corruption from concurrent write operations
|
||||
- Read operations remain lock-free due to existing `Yamux` architecture
|
||||
- Resolves race conditions identified in Issue #793
|
||||
Reference in New Issue
Block a user