-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Move semantics for cross-task operations #678
Comments
As of 54be5b0, this should be translating mostly correctly. There are still issues with typechecking it though. |
With Graydon's work on move-mode arguments, and moving the task/comm system into a library, we're pretty much there. There still needs to be more safety checking on |
Let's make sure spawn takes a ~fn and that it's safe |
Spawn currently uses move-mode, so kind checking should hopefully enforce that you're giving it a ~fn. |
ok. I believe ~fn is not currently enforced - need to investigate. Further considerations: all of the things inside the spawned closure need to be ~, and all the environment allocs need to be migrated to the new task and dropped when the new task ends. |
fn~ is covered by #568, so I'm going to call this done. I'm sure we'll revisit task semantics post-0.1. |
* Primal activity analysis fix * bugfix * Fix tests
Channel operations (mainly sending) should have move semantics and only be allowed for unique things.
This also applies to arguments to spawned functions, and probably the spawned function itself.
The text was updated successfully, but these errors were encountered: