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.
In #2,
withAsyncWithUnmaskandwithAsyncOnWithUnmask(and their non-withcounterparts) were added, as well aswithAsyncBound. However, there's nowithAsyncBoundWithUnmaskdespite the existence offorkOSWithUnmaskin 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.) passesunsafeUnmaskto the forked action, I guess one could do the same for bound threads (when nowithAsyncBoundWithUnmaskis available inasync), i.e., usewithAsyncBoundand callunsafeUnmaskwithin the forked action, but I'm not quite sure it's a smart thing to do.Any chance
asynccould get support for bounded-with-unmask calls, if that makes sense? Happy to draft a PR if deemed useful.