
12 Dec
2010
12 Dec
'10
9:19 p.m.
Hi!
On Mon, Dec 13, 2010 at 2:14 AM, Antoine Latter
Can you do it with forkIO? That is, have two light-weight threads, each waiting on a different fd, which perform the same action when one of them wakes up.
Or you could wait for each fd in its own thread (those are really light-weight threads) and once some is triggered you spawn another thread which deals with the event, while the original thread goes back into the waiting. Or you can also send data over Chan to another thread which then processes the even (if you need to serialize processing). Mitar