RE: [Haskell-cafe] Re: Thread pool in GHC

2005-09-14 Thread Simon Marlow
On 07 September 2005 16:04, Dinh Tien Tuan Anh wrote: > So is there a way to reuse thread ? > I think eventhough threads in GHC are extremely lighweight, it still > make a different if u keep launching and killing thread in so many > times. My advice would be to try without a thread pool first,

Re: [Haskell-cafe] Re: Thread pool in GHC

2005-09-07 Thread Dinh Tien Tuan Anh
So is there a way to reuse thread ? I think eventhough threads in GHC are extremely lighweight, it still make a different if u keep launching and killing thread in so many times. TuanAnh Yes, but AFAIK, threads in Haskell are exceedingly lightweight, as they are only primitives for concurre

Re: [Haskell-cafe] Re: Thread pool in GHC

2005-09-06 Thread genneth
performance by getting of the overhead of creating new thread. > > TuanAnh > > >From: genneth <[EMAIL PROTECTED]> > >To: Dinh Tien Tuan Anh <[EMAIL PROTECTED]> > >CC: haskell-cafe@haskell.org > >Subject: Re: [Haskell-cafe] Re: Thread pool in GHC > >

Re: [Haskell-cafe] Re: Thread pool in GHC

2005-09-06 Thread Dinh Tien Tuan Anh
repeated for an infinite times, so thread reuse would improve the performance by getting of the overhead of creating new thread. TuanAnh From: genneth <[EMAIL PROTECTED]> To: Dinh Tien Tuan Anh <[EMAIL PROTECTED]> CC: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Re: Thread

Re: [Haskell-cafe] Re: Thread pool in GHC

2005-09-05 Thread genneth
I think it would go back to the pool. The finally clause means that even if the thread dies from an exception (which, AFAIK, is how kills are modelled), the thread count would be restored. Gen On 9/6/05, Dinh Tien Tuan Anh <[EMAIL PROTECTED]> wrote: > > Its probably too long to bring back this t

RE: [Haskell-cafe] Re: Thread pool in GHC

2005-09-05 Thread Dinh Tien Tuan Anh
Its probably too long to bring back this topic, but i have a small question. If some threads may never terminate and have to be killed by killThread, are they going back to the pool, or we need some twist to force them. Thanks a lot TuanAnh From: genneth <[EMAIL PROTECTED]> To: haskell-cafe