Re: [Haskell-cafe] Concurrency questions

2008-01-08 Thread Tomasz Zielonka
On Mon, Jan 07, 2008 at 10:59:02AM -0600, Spencer Janssen wrote: On Sun, Jan 06, 2008 at 11:30:53AM +, Andrew Coppin wrote: Just a couple of things I was wondering about... 1. Is there some way to assign a priority to Haskell threads? (The behaviour I'd like is that high priority

Re: [Haskell-cafe] Concurrency questions

2008-01-07 Thread Andrew Coppin
Spencer Janssen wrote: On Sun, Jan 06, 2008 at 11:30:53AM +, Andrew Coppin wrote: Just a couple of things I was wondering about... 1. Is there some way to assign a priority to Haskell threads? (The behaviour I'd like is that high priority threads always run first, and low priority

Re: [Haskell-cafe] Concurrency questions

2008-01-07 Thread Don Stewart
andrewcoppin: Spencer Janssen wrote: On Sun, Jan 06, 2008 at 11:30:53AM +, Andrew Coppin wrote: Just a couple of things I was wondering about... 1. Is there some way to assign a priority to Haskell threads? (The behaviour I'd like is that high priority threads always run first, and

Re: [Haskell-cafe] Concurrency questions

2008-01-07 Thread Spencer Janssen
On Mon, Jan 07, 2008 at 09:40:29PM +, Andrew Coppin wrote: Well, I was thinking more of using them for two things. One is for speculative work (i.e., doing work which we might need later - but don't bother unless there's cores going spare). For (pure) speculative tasks, try

[Haskell-cafe] Concurrency questions

2008-01-06 Thread Andrew Coppin
Just a couple of things I was wondering about... 1. Is there some way to assign a priority to Haskell threads? (The behaviour I'd like is that high priority threads always run first, and low priority threads potentially never run at all unless there's an available processor which is

Re: [Haskell-cafe] Concurrency questions

2008-01-06 Thread Felipe Lessa
On Jan 6, 2008 9:30 AM, Andrew Coppin [EMAIL PROTECTED] wrote: 2. I have a situation where I have a thread generating some data and putting it into a mutable array, and another thread trying to read that data. Is there a way I can make the reader thread block if it tries to read a cell that

Re: [Haskell-cafe] Concurrency questions

2008-01-06 Thread Andrew Coppin
Felipe Lessa wrote: On Jan 6, 2008 9:30 AM, Andrew Coppin [EMAIL PROTECTED] wrote: 2. I have a situation where I have a thread generating some data and putting it into a mutable array, and another thread trying to read that data. Is there a way I can make the reader thread block if it tries