1
0
Fork 0

Fix possible lock

This commit is contained in:
Michał Rudowicz 2024-02-11 22:51:33 +01:00
parent bec0241d9c
commit 3c3636637e
1 changed files with 4 additions and 2 deletions

View File

@ -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) {