FAQ
http://codereview.appspot.com/6553059/diff/5001/src/pkg/exp/inotify/inotify_linux.go
File src/pkg/exp/inotify/inotify_linux.go (right):

http://codereview.appspot.com/6553059/diff/5001/src/pkg/exp/inotify/inotify_linux.go#newcode156
src/pkg/exp/inotify/inotify_linux.go:156: n, err := syscall.Read(w.fd,
buf[0:])
^ this will block until a new event is received.
this is only a problem if there are no watches when closing the watcher.
(otherwise the syscall.InotifyRmWatch call triggers a new IN_IGNORED
event that unblocks the syscall.Read).

could you advise me if i should use a syscall.Select or a lazy
readEvents go routine to tackle that problem?

both solutions are drafted in github.com/mb0/inotify (latest two
commits).
i would like two fix both issues in the next patch. thank you!

http://codereview.appspot.com/6553059/

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 7, '12 at 9:17p
activeOct 7, '12 at 9:17p
posts1
users1
websitegolang.org

1 user in discussion

Mbnull Org: 1 post

People

Translate

site design / logo © 2022 Grokbase