[Haskell-cafe] Threads with high CPU usage

Andrea Vezzosi sanzhiyan at gmail.com
Sun Dec 21 19:47:19 EST 2008


Tried running the program with +RTS -Nn where n = 2 or more? that should use
more OS threads

On Sun, Dec 21, 2008 at 10:43 PM, Günther Schmidt <redcom at fedoms.com> wrote:

> Hi,
>
> in an application of mine I start a long-running operation in a thread via
> forkIO so that the UI process doesn't get blocked.
> It just so happens, that the long-running process also takes the CPU to
> nearly 100% while it runs.
>
> During that time the run-time system does *not* switch back and forth
> between the UI-process and the long-running task, it seems that the UI
> process only gets woken up *after* the high CPU thread finishes completely.
>
> To the effect of course that it makes no difference at all to the UIs
> responsiveness whether I use forkIO or not.
>
> The long running process is pretty atomic, it's a single query to the
> database which takes up to a minute to complete so I don't see a chance to
> squeeze a "mainIteration" in there.
>
> What can I do?
>
> Günther
>
> _______________________________________________
> 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/20081222/054c6df7/attachment.htm


More information about the Haskell-Cafe mailing list