Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Should ki force the return value of a thread to WHNF? #24

Closed
mitchellwrosen opened this issue Mar 20, 2023 · 1 comment
Closed

Should ki force the return value of a thread to WHNF? #24

mitchellwrosen opened this issue Mar 20, 2023 · 1 comment

Comments

@mitchellwrosen
Copy link
Member

I wonder if ki should force a thread's result to WHNF before returning.

This would be inconsistent with async, and probably other threading libraries, so by the principle of least surprise, maybe we shouldn't do this.

However, it might be nice to assist users in performing (some) computation on the dedicated thread they explicitly spawn, rather than let them accidentally conclude a background thread with some expensive thunk that's computed by the first awaiter who peeks at it.

@ocharles
Copy link

One option might be to add fork', using the convention that ' means strict

@awkward-squad awkward-squad locked and limited conversation to collaborators Jun 7, 2024
@mitchellwrosen mitchellwrosen converted this issue into discussion #32 Jun 7, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants