←back to thread

257 points pg | 1 comments | | HN request time: 0.216s | 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 #
jey ◴[] No.2121028[source]
Rtm's phrasing implies that MzScheme is making a syscall for each socket in turn, so it sounds like it isn't even using the basic select() or poll().
replies(1): >>2121535 #
1. mahmoudimus ◴[] No.2121535[source]
I thought the same exact thing when I read rtm's description. I thought to myself select()/poll() is much more efficient, and it sounds like that's not what's implemented underneath.