Should ki
force the return value of a thread to WHNF?
#32
mitchellwrosen
started this conversation in
General
Replies: 1 comment
-
One option might be to add |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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.
Beta Was this translation helpful? Give feedback.
All reactions