They have pointers into a heap shared with other tasks in their thread.
We'd have to dig through that heap cloning everything they point to.
Erlang is more militant about his and just says "message sends never
share" -- they're either deep copies or moves. We *could* adopt that
stance (especially after we have unique boxes). If we did, we could
reassign tasks to threads arbitrarily.
I like this. It also has the advantage that changing from a task to a
thread in a refactoring doesn't change same operations from O(1) to O(n).
Immutable data can still be passed by references, so if this can be
combined some form of "freeze" operation than this can be made really
flexible.
In this model a task blocking for any reason (even page faults) will
block the thread it is on, but will not prevent any other task from
executing on other threads.
-Graydon
Cheers,
Rafael
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev