Skip to content

Use mutex instead of RwLock to avoid lock on network awaits#69

Merged
takitsu21 merged 1 commit intomainfrom
push-slzqpxmzwoxk
Mar 2, 2026
Merged

Use mutex instead of RwLock to avoid lock on network awaits#69
takitsu21 merged 1 commit intomainfrom
push-slzqpxmzwoxk

Conversation

@takitsu21
Copy link
Copy Markdown
Owner

Refactored the ratio‑faker concurrency model by replacing nested RwLock state with a handle that uses tokio::Mutex for mutation and a watch channel for lock‑free stats snapshots, preventing UI freezes and avoiding lock holding across network awaits.

@takitsu21 takitsu21 self-assigned this Mar 2, 2026
@takitsu21 takitsu21 added the bug Something isn't working label Mar 2, 2026
@takitsu21 takitsu21 force-pushed the push-slzqpxmzwoxk branch 2 times, most recently from 46b8ec5 to 2c00df5 Compare March 2, 2026 17:23
@takitsu21 takitsu21 force-pushed the push-slzqpxmzwoxk branch from 2c00df5 to 640c0dc Compare March 2, 2026 17:30
@takitsu21 takitsu21 merged commit 85cc1ad into main Mar 2, 2026
2 checks passed
@takitsu21 takitsu21 deleted the push-slzqpxmzwoxk branch March 2, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant