←back to thread

257 points pg | 1 comments | | HN request time: 0s | source
Show context
jey ◴[] No.2120792[source]
> when [MzScheme] wants to find a thread to run, it asks the O/S kernel about each socket in turn to see if any input is ready

They've never heard of select()? </snark>

But really, is there some reason that it's hard to collect up all the fds at once or something?

replies(2): >>2120941 #>>2121182 #
kujawa ◴[] No.2120941[source]
Read C10K? Both select() and poll() have this problem internally. You have to use one of the more advanced techniques available if you really want to scale. epoll(), kqueue() or friends.
replies(3): >>2121028 #>>2121055 #>>2122143 #
caf ◴[] No.2122143[source]
poll() is slightly better than select(), because you only have to iterate over the file descriptors that were passed, rather than from 0 to nfds.
replies(2): >>2122872 #>>2123869 #
1. maw ◴[] No.2123869[source]
It doesn't hurt that its interface is far more pleasant to use than select's, either.