Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing withAsyncBoundWithUnmask? #147

Open
NicolasT opened this issue Mar 23, 2023 · 0 comments
Open

Missing withAsyncBoundWithUnmask? #147

NicolasT opened this issue Mar 23, 2023 · 0 comments

Comments

@NicolasT
Copy link

NicolasT commented Mar 23, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant