Skip to content

Missing withAsyncBoundWithUnmask? #147

@NicolasT

Description

@NicolasT

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions