fix race in runWorker

This commit is contained in:
Łukasz Magiera 2020-07-17 01:46:59 +02:00
parent bf315e63d7
commit 908d47305b

View File

@ -367,7 +367,10 @@ func (sh *scheduler) trySched() {
func (sh *scheduler) runWorker(wid WorkerID) {
go func() {
sh.workersLk.Lock()
worker := sh.workers[wid]
sh.workersLk.Unlock()
scheduledWindows := make(chan *schedWindow, SchedWindows)
taskDone := make(chan struct{}, 1)
windowsRequested := 0