/.../ or that Pike loops over every socket that made poll exit until it calls poll again (which is a good idea, generally?).
That's probably it, judging from your comment at the start of __stdio_read_callback. I see two ways to solve it without resorting to peeking, which apparently is slow:
1. Read out the data from all the fds before calling any callbacks. 2. Read out the data from one of the fds and do the equivalent of read(0,1) on all the others, then call the callback for the one fd only.
The first solution can have tricky compatibility effects in code that reads on an fd from the read callback of another; it will no longer get any data since it has been read already. Otoh, it seems very precarious to write such code. Do you remember where you came across it?
/ Martin Stjernholm, Roxen IS
Previous text:
2003-03-19 23:28: Subject: I/O callbacks in blocking mode
I don't recall the exact situation now. It might have been a Linux poll issue, or that Pike loops over every socket that made poll exit until it calls poll again (which is a good idea, generally?).
Is there a dumped infokom archive somewhere?
/ Mirar