Skip to content

Some question about executor and golang #252

Answered by JohnRoesler
kysshsy asked this question in Q&A
Discussion options

You must be logged in to vote

The write on line 110 is ready by the channel read on line 100:

gocron/executor.go

Lines 100 to 105 in 560e7b9

case <-e.stopCh:
cancel()
runningJobsWg.Wait()
e.stopCh <- struct{}{}
return
}

To my knowledge it couldn't read on line 111 before the 110 write was ready by 100. 111 then waits for the write on 103.

We'd have to dig deeper into how channels / goroutines work to understand if its possible if say one of the gorouintes is running much slower and that causes some out of sync issues.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kysshsy
Comment options

Answer selected by kysshsy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants