
26 Aug
2008
26 Aug
'08
4:43 p.m.
Perhaps you'll want to continue with the hGetLine setup in one thread
(assuming the NNTP data is line delimited), then in another, parse the data,
then in a third, respond.
Lookup how to use MVar's. Allowing the threads to block on reads/writes is a
lot easier (logically) than figuring out the mess in a single threaded
system. When you have a system like Haskell's threading tools, you're much
better off splitting the tasks up into blocking calls with MVar's to
synchronize.
(Perhaps MVar's aren't quite the correct solution here, but it seems like it
would work to me.)
On Tue, Aug 26, 2008 at 4:40 PM, brian
On Tue, Aug 26, 2008 at 3:38 PM, John Van Enk
wrote: Are you doing this all in a single thread?
Yes.
-- /jve