Close removes all watches and closes the events channel.
log.Fatal(err) } defer watcher.Close() done := make(chan bool)
// Close immediately; it won't even reach the first unix.Read. w.Close() // Wait for the close to complete.
// Wait until readEvents has reached unix.Read, and Close. <-time.After(50 * time.Millisecond) w.Close() // Wait for the close to complete.