Re: [Haskell] thread-local variables

2006-08-06 Thread Taral
On 8/5/06, Frederik Eaton <[EMAIL PROTECTED]> wrote: Also, note that my proposal differs in that thread local variables are not writable, but can only be changed by calling (e.g. in my API) 'withIOParam'. [snip] and if some library I use decides to fork a thread behind the scenes, it won't chan

Re: [Haskell] thread-local variables

2006-08-06 Thread Einar Karttunen
On 05.08 19:56, Frederik Eaton wrote: > That doesn't answer the question: What if my application has a need > for several different sets of parameters - what if it doesn't make > sense to combine them into a single monad? What if there are 'n' > layers? Is it incorrect to say that the monadic appro

Re: [Haskell] thread-local variables

2006-08-06 Thread Einar Karttunen
On 06.08 02:41, Frederik Eaton wrote: > Also, note that my proposal differs in that thread local variables are > not writable, but can only be changed by calling (e.g. in my API) > 'withIOParam'. This is still just as general, because an IORef can be > stored in a thread-local variable, but it make

Re: [Haskell] thread-local variables

2006-08-06 Thread Einar Karttunen
On 06.08 04:23, Frederik Eaton wrote: > I also forgot to mention that if you hold on to a ThreadId, it > apparently causes the whole thread to be retained. Simon Marlow > explained this on 2005/10/18: Actually this problem does not exist in the code. The problem is encountered if children are tied