Last active
September 20, 2023 19:13
-
-
Save apmckinlay/66cb963f726d171170418d78ef3b965a to your computer and use it in GitHub Desktop.
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
for { | |
time.Sleep(interval) | |
if ws.killClock.Add(1) > createDelay && nworkers.Load() > minWorkers { | |
ws.ch <- task{} // send poison pill to one worker | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment