Skip to content

Commit ffcc627

Browse files
committed
closing shutdown channel instead of sending values to it.
1 parent b3b4091 commit ffcc627

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

main.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,8 @@ func main() {
292292
}
293293
}()
294294

295-
// Send the worker shutdown signal for each worker thread to read
296-
workerShutdownChan <- true
297-
workerShutdownChan <- true
298-
workerShutdownChan <- true
295+
// Close the channel, signalling to the worker threads to shutdown.
296+
close(workerShutdownChan)
299297

300298
// Wait for all workers to finish their tasks.
301299
// Otherwise we end up getting flushed file saves incomplete.

0 commit comments

Comments
 (0)