Fix possible lock
This commit is contained in:
parent
bec0241d9c
commit
3c3636637e
6
main.go
6
main.go
|
@ -40,8 +40,10 @@ type RealSleeper struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self RealSleeper) Sleep(ch chan<- interface{}) {
|
func (self RealSleeper) Sleep(ch chan<- interface{}) {
|
||||||
time.Sleep(self.duration)
|
go func() {
|
||||||
ch <- nil
|
time.Sleep(self.duration)
|
||||||
|
ch <- nil
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
func getCmdLineParams(logger *log.Logger) (string, []int64) {
|
func getCmdLineParams(logger *log.Logger) (string, []int64) {
|
||||||
|
|
Loading…
Reference in New Issue