Close rdy channel

+ close `rdy` channel to ensure that calls to `<-ready()` will
    always return if the routine is ready
This commit is contained in:
Sean Braithwaite 2019-08-21 21:37:53 +02:00
parent f81c319ece
commit 9d41770a99

View File

@ -67,7 +67,7 @@ func (rt *Routine) start() {
if !starting {
panic("Routine has already started")
}
rt.rdy <- struct{}{}
close(rt.rdy)
errorsDrained := false
for {
if !rt.isRunning() {