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:
Michael Eze
2025-09-04 10:51:52 +01:00
parent 74f4aaf136
commit c5a2836829
5 changed files with 149 additions and 134 deletions

View File

@ -1,6 +1,5 @@
import pytest
@pytest.fixture
def security_protocol():
return None
return None