#5773: main = forever (putStrLn =<< getLine) continuously saturates a CPU when
compiled
-------------------------------------+--------------------------------------
Reporter: lpsmith | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.4.1-rc1 | Keywords:
Os: Linux | Architecture: x86_64 (amd64)
Failure: Runtime performance bug | Testcase:
Blockedby: | Blocking:
Related: |
-------------------------------------+--------------------------------------
Comment(by lpsmith):
Playing around with this issue a little bit more, {{{getLine}}} and
{{{hGet}}} from {{{Data.ByteString.Char8}}} also saturate the CPU when
they block. However I do have some code that uses {{{threadWaitRead}}}
and a C library to fetch some input (specifically, the asynchronous
notification mechanism of PostgreSQL via libpq), which does not exhibit
this problem.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5773#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs