From e71f3fb02d5da3553fc8e80eed84394b962b118f Mon Sep 17 00:00:00 2001 From: root Date: Fri, 23 Nov 2007 08:36:35 +0000 Subject: *** empty log message *** --- ev.html | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'ev.html') diff --git a/ev.html b/ev.html index 93e8e56..7e332d2 100644 --- a/ev.html +++ b/ev.html @@ -6,7 +6,7 @@ - + @@ -230,6 +230,9 @@ result in some caching, there is still a syscall per such incident (because the fd could point to a different file description now), so its best to avoid that. Also, dup()ed file descriptors might not work very well if you register events for both fds.

+

Please note that epoll sometimes generates spurious notifications, so you +need to use non-blocking I/O or other means to avoid blocking when no data +(or space) is available.

EVBACKEND_KQUEUE (value 8, most BSD clones)
@@ -252,6 +255,9 @@ incident, so its best to avoid that.

This uses the Solaris 10 port mechanism. As with everything on Solaris, it's really slow, but it still scales very well (O(active_fds)).

+

Please note that solaris ports can result in a lot of spurious +notifications, so you need to use non-blocking I/O or other means to avoid +blocking when no data (or space) is available.

EVBACKEND_ALL
@@ -550,6 +556,16 @@ the same underlying "file open").

Configures an ev_io watcher. The fd is the file descriptor to rceeive events for and events is either EV_READ, EV_WRITE or EV_READ | EV_WRITE to receive the given events.

+

Please note that most of the more scalable backend mechanisms (for example +epoll and solaris ports) can result in spurious readyness notifications +for file descriptors, so you practically need to use non-blocking I/O (and +treat callback invocation as hint only), or retest separately with a safe +interface before doing I/O (XLib can do this), or force the use of either +EVBACKEND_SELECT or EVBACKEND_POLL, which don't suffer from this +problem. Also note that it is quite easy to have your callback invoked +when the readyness condition is no longer valid even when employing +typical ways of handling events, so its a good idea to use non-blocking +I/O unconditionally.

-- cgit v1.2.3