-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v15] kube: fix data race caused by improper usage of
sync.WaitGroup
(
#43026) * kube: fix data race caused by improper usage of `sync.WaitGroup` This PR drops usage of `sync.WaitGroup` for events routines because it's called concurrently when the session starts - all moderation criteria are met - but can be closed by multiple readers. This PR introduced a new `concurrentWaitGroup` based on `sync.Cond` to do the job of keeping track of events goroutines when closing a session. Signed-off-by: Tiago Silva <tiago.silva@goteleport.com> * rename to weakWaitGroup and add docs * fix typo * call broadcast when wait has been called --------- Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
- Loading branch information
Showing
1 changed file
with
73 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters