[Haskell-cafe] Question about forkIO

C K Kashyap ckkashyap at gmail.com
Thu Feb 28 20:00:59 CET 2013


Hey Donn ...... thanks, it turns out that threads do resume!!! This is how
I got my gmail stuff working.
I only have a doubt if the TCP "keep/alive" stuff continues to happen or
not....

Regards,
Kashyap


On Thu, Feb 28, 2013 at 9:07 PM, Donn Cave <donn at avvanta.com> wrote:

> Quoth C K Kashyap <ckkashyap at gmail.com>,
> ...
> > Say I have a haskell function 'f' that does a forkIO and starts an action
> > "a".  I create a DLL of this haskell code and inovke "f" from C. Can I
> > expect the "a" to continue to run once "f" has returned to C?
>
> Once control returns to f's caller, outside of the Haskell runtime,
> then there isn't any way to dispatch IO threads - that's done by
> the runtime, so it can happen only while executing in the runtime.
> I am not a forkIO expert, that's just how it appears to me from my
> limited understanding of how they work.
>
> For extra credit - do the old IO threads resume if you call 'f' again,
> so you'd have more each time?  (I don't know!)
>
>         Donn
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130301/bbb1d60f/attachment.htm>


More information about the Haskell-Cafe mailing list