The behavior of libdispatch is: 1) Consistent with traditional Unix event delivery APIs like select() and poll(); and newer APIs like BSD kqueues. 2) Convenient for datagram driven protocols (such as UDP) where a packet is read or not-read, but never partially read. 3) Inconsequential to stream driven protocols (such as TCP), since it is practically impossible to implement multiple readers/writers to a given socket due to partial reads or partial writes. In other words, these clients only create one dispatch source per stream to avoid the partial read/write problem, and therefore they avoid the problem that you describe. davez On Aug 28, 2010, at 5:20 AM, cee1 wrote:
Hi all,
A kevent can associate with more than one source. What if: A kevent of EVFILT_READ indicating that data is available to read. A series of sources associating with this kevent are waken up. One source handler fetches the data. The rest source handlers will find there is no data available to read in monitored fd. It seems waking up more than one source doesn't make sense here? The rest source handlers will simply fail to read.
-- Regards,
- cee1
_______________________________________________ libdispatch-dev mailing list libdispatch-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev