Messages in this thread | | | Date | Fri, 18 Oct 2002 13:00:24 -0400 | From | Mark Mielke <> | Subject | Re: epoll (was Re: [PATCH] async poll for 2.5) |
| |
> >>> while (read() == EAGAIN) > >>> wait(POLLIN);
I find myself still not understanding this thread. Lots of examples of code that should or should not be used, but I would always choose:
... ensure file descriptor is blocking ... for (;;) { int nread = read(...); ... }
Over the above, or any derivative of the above.
What would be the point of using an event notification mechanism for synchronous reads with no other multiplexed options?
A 'proper' event loop is significantly more complicated. Since everybody here knows this... I'm still confused...
mark
-- mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________ . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada
One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them...
http://mark.mielke.cc/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |