3/18 Technical question. I have a bunch of sockets that I want to wait
on for input, so I'm using poll. However, frequetly another thread
has to add another socket to the set. How do I wake thee thread
out of poll to accept the new socket and add it to the read set?
Right now I'm having the poll also check a pipe which I send a single
character over when I have a new socket to add. Is there some
better way to do this? Should I be using something other than poll?
\_ That's a pretty reasonable solution. Although someone else
may have a better response. Are you using linux or freebsd? Cause
you may want to look into epoll/kqueue. |