-
Notifications
You must be signed in to change notification settings - Fork 71
Description
In #2, withAsyncWithUnmask and withAsyncOnWithUnmask (and their non-with counterparts) were added, as well as withAsyncBound. However, there's no withAsyncBoundWithUnmask despite the existence of forkOSWithUnmask in GHC.
Is there a particular reason for this omission? Are bound threads somehow special w.r.t. masking states?
Since the implementation of withAsyncWithUnmask (etc.) passes unsafeUnmask to the forked action, I guess one could do the same for bound threads (when no withAsyncBoundWithUnmask is available in async), i.e., use withAsyncBound and call unsafeUnmask within the forked action, but I'm not quite sure it's a smart thing to do.
Any chance async could get support for bounded-with-unmask calls, if that makes sense? Happy to draft a PR if deemed useful.