[Haskell-cafe] Parsec and network data
John Van Enk
vanenkj at gmail.com
Tue Aug 26 16:43:45 EDT 2008
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
(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 <brianchina60221 at gmail.com> wrote:
> On Tue, Aug 26, 2008 at 3:38 PM, John Van Enk <vanenkj at gmail.com> wrote:
> > Are you doing this all in a single thread?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe