this can just be a Sleep again right? it's a fresh ticker each time
104 + // wait for the destructor to be called
105 +Out:
106 + for {
107 + select {
108 + case <-ch:
109 + break Out
110 + case <-time.Tick(time.Millisecond):
111 + }
112 + }
I don't understand this code, shouldn't it just be a:
select {
case <- ch:
break
case <- time.After(TIMEOUT):
FAIL!
}
76 + <-time.Tick(10 * time.Millisecond)
this can just be a Sleep again right? it's a fresh ticker each time
104 + // wait for the destructor to be called Tick(time. Millisecond) :
105 +Out:
106 + for {
107 + select {
108 + case <-ch:
109 + break Out
110 + case <-time.
111 + }
112 + }
I don't understand this code, shouldn't it just be a:
select { TIMEOUT) :
case <- ch:
break
case <- time.After(
FAIL!
}
without the busy loop