Some question about executor and golang #252
-
I found Line 110 in 560e7b9 it sends a value to buffered channel Line 111 in 560e7b9 next line, it read from the same buffered channel. Is it possible that it reads the value it sends and the executor doesn't stop. Is this a golang skill(trick) ? excuse my poor english |
Beta Was this translation helpful? Give feedback.
Answered by
JohnRoesler
Nov 2, 2021
Replies: 1 comment 1 reply
-
The write on line 110 is ready by the channel read on line 100: Lines 100 to 105 in 560e7b9 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. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kysshsy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The write on line 110 is ready by the channel read on line 100:
gocron/executor.go
Lines 100 to 105 in 560e7b9
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.