Skip to content

Commit

Permalink
add lock
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed Sep 26, 2023
1 parent a63ecc2 commit 0ea0068
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/schedule/schedulers/scheduler_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ func NewController(ctx context.Context, cluster sche.SchedulerCluster, storage e

// Wait waits on all schedulers to exit.
func (c *Controller) Wait() {
c.Lock()
defer c.Unlock()
c.wg.Wait()
}

Expand Down

0 comments on commit 0ea0068

Please sign in to comment.