Code review comment for lp:~chipaca/ubuntu-push/watchticker

Revision history for this message
Samuele Pedroni (pedronis) wrote :

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
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!
}

without the busy loop

« Back to merge proposal