Skip to content

Commit 9137d43

Browse files
Fixed more comments
1 parent f3dc0d1 commit 9137d43

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎chapter6/patterns/timer/timer.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ControlLoop:
3939
for {
4040
select {
4141
case <-sigChan:
42+
// Interrupt event signaled by the operation system.
4243
log.Println("OS INTERRUPT - Shutting Down Early")
4344

4445
// Set the flag to indicate the program should be shutdown early.
@@ -47,13 +48,12 @@ ControlLoop:
4748
continue
4849

4950
case <-timeout:
50-
log.Println("Timeout - Killing Program")
51-
5251
// We have taken too much time. Kill the app hard.
53-
log.Println("Process Ended")
52+
log.Println("Timeout - Killing Program")
5453
os.Exit(1)
5554

5655
case err := <-complete:
56+
// Everything complete within the time given.
5757
log.Printf("Task Complete: Error[%s]", err)
5858
break ControlLoop
5959
}

0 commit comments

Comments
 (0)