-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Hi, I was just re-reading your excellent book and came across this warning:
There is nothing in the types to stop you from returning an IVar from runPar and
passing it to another call of runPar. This is a Very Bad Idea; don’t do it. The
implementation of the Par monad assumes that IVars are created and used
within the same runPar, and breaking this assumption could lead to a runtime
error, deadlock, or worse.
The library could prevent you from doing this using qualified types in the same
way that the ST monad prevents you from returning an STRef from runST. This
is planned for a future version.
Just curious, is this still meant to happen at some point?
Metadata
Metadata
Assignees
Labels
No labels