jorendorff / cell-gc

A very small GC in Rust, with a safe API
MIT License
61 stars 4 forks source link

Support owned heaps #7

Open jorendorff opened 7 years ago

jorendorff commented 7 years ago

There should be API to let a user store heaps in data structures, move a heap from one thread to another, etc.

jorendorff commented 7 years ago

Reopening. This is incomplete as long as there's no way to keep a ref alive across sessions.

Right now, when you leave a session, everything in the heap is garbage, so keeping the heap alive is useless.

We need a way for a session to say, ok, this GcRef<'h, T> points to something I want to come back to later, save that as a DormantGCRef<T> or something, and in a later session turn it back into a normal GcRef<'h2, T>.

jorendorff commented 7 years ago

Still open until #29 is fixed.