From b459250e61c6019402748c1cbf019cb3ba27c5be Mon Sep 17 00:00:00 2001 From: Pieter Droogendijk Date: Sun, 8 Feb 2015 00:34:02 +0100 Subject: [PATCH] Minor doc and test typos --- inotify_poller.go | 3 ++- inotify_poller_test.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inotify_poller.go b/inotify_poller.go index 796a171..1433a22 100644 --- a/inotify_poller.go +++ b/inotify_poller.go @@ -71,7 +71,7 @@ func newFdPoller(fd int) (_ *fdPoller, errno error) { 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) { @@ -154,6 +154,7 @@ func (poller *fdPoller) wake() 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 { diff --git a/inotify_poller_test.go b/inotify_poller_test.go index 83dc580..af9f407 100644 --- a/inotify_poller_test.go +++ b/inotify_poller_test.go @@ -46,7 +46,7 @@ func (tfd testFd) get(t *testing.T) { 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) } } -- 2.50.1