Threads

Filip tomf16@poczta.onet.pl
Fri, 13 Jun 2003 17:33:24 +0200


Hi,

I have function
f:: a -> b

and I need something like this:

myaccept:: Socket ->  IO ()
myaccept g = do a <- accept g
                         t <- forkIO (f a)
                         myaccept g

What to do to have two threads working at the same time. When I am using myaccept, program is suspending.

Thanks.