Haskell's missing mutable reference type

michaelpj:

OK, this is supposed to be clear from loggerExampleConcurrently. I’ll see if I can clarify that.

In that example you do the modification inside the fork, so it wasn’t obvious to me whether the modification would be visible if you did it the other way around.

Ah yes, this example needs improving, thanks!

michaelpj:

What’s the use of having thread local state that…

Read more →
Haskell's missing mutable reference type

OK, this is supposed to be clear from loggerExampleConcurrently. I’ll see if I can clarify that.

In that example you do the modification inside the fork, so it wasn’t obvious to me whether the modification would be visible if you did it the other way around.

How would the behaviour differ? Do you mean that InheritedThreadLocalIORef could be modified within a thread like an…

Read more →
Haskell's missing mutable reference type

michaelpj:

Sounds great. Not very clear from the article that that’s the intended semantics though!

OK, this is supposed to be clear from loggerExampleConcurrently. I’ll see if I can clarify that.

michaelpj:

So I guess my API question is whether this is best thought of as a new kind of thread-local variable. Is there anything that you can do with your IOScopedRef API that you couldn’t…

Read more →
Page 1