Skip to content

fix: lock mutex before cond.Broadcast() calls#18452

Open
CreeptoGengar wants to merge 2 commits intoerigontech:mainfrom
CreeptoGengar:fix/sync-cond-mutex-broadcast
Open

fix: lock mutex before cond.Broadcast() calls#18452
CreeptoGengar wants to merge 2 commits intoerigontech:mainfrom
CreeptoGengar:fix/sync-cond-mutex-broadcast

Conversation

@CreeptoGengar
Copy link
Copy Markdown
Contributor

Lock mutex before calling cond.Broadcast() in SetAndBroadcast() and Wait() methods to follow sync.Cond best practices and prevent potential race conditions.
This ensures proper synchronization between setting the event state and notifying waiters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants