Re:The state of the Rust Runtime
by bad_user on Sunday December 29, 2013 @06:52PM
(#6982176)
Rust has the concept of a shared heap meant for sharing memory between tasks. Tasks do have to claim (and then release) ownership of references from this shared heap, so this works like a locking mechanism, preventing 2 tasks from modifying a reference at the same time.
References on the shared heap can't be managed by a garbage collector. But references on local heaps can be managed by a thread-local garbage collector. Which is actually rather cool, as Rust basically sidesteps the need for having a concurrent, compacting, generational GC (in Rust the GC is also entirely optional).
References on the shared heap can't be managed by a garbage collector. But references on local heaps can be managed by a thread-local garbage collector. Which is actually rather cool, as Rust basically sidesteps the need for having a concurrent, compacting, generational GC (in Rust the GC is also entirely optional).