return poller, nil
}
-// Wait using epoll, then read from inotify.
+// Wait using epoll.
// Returns true if something is ready to be read,
// false if there is not.
func (poller *fdPoller) wait() (bool, error) {
}
func (poller *fdPoller) clearWake() error {
+ // You have to be woken up a LOT in order to get to 100!
buf := make([]byte, 100)
n, errno := syscall.Read(poller.pipe[0], buf)
if n == -1 {
buf := make([]byte, 10)
_, errno := syscall.Read(tfd[0], buf)
if errno != nil {
- t.Fatalf("Failed to write from pipe: %v", errno)
+ t.Fatalf("Failed to read from pipe: %v", errno)
}
}