GHC 7.8.3 thread hang

Gregory Collins greg at gregorycollins.net
Tue Nov 11 16:45:04 UTC 2014


On Mon, Nov 10, 2014 at 11:11 PM, Michael Jones <mike at proclivis.com> wrote:

>        ec <- return $ encode command
>        traceEventIO $ "sendCommand: encoded"
>        l <- ec `seq` return $ BSL.length ec
>

Your encode function probably loops on some inputs. When you call "return $
foo", foo is not forced; that doesn't happen in your example until
BSL.length forces its input. If I'm right, changing the first line to
"return $! encode command" will move the hang to before the call to
traceEventIO.

-- 
Gregory Collins <greg at gregorycollins.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20141111/602ba6d8/attachment.html>


More information about the Glasgow-haskell-users mailing list