kyren / gc-arena

Incremental garbage collection from safe Rust
Creative Commons Zero v1.0 Universal
502 stars 41 forks source link

Expose the live GC flag as `GcWeak(Cell)::is_dropped` #47

Closed moulins closed 1 year ago

moulins commented 1 year ago

This is mainly intended for implementors of weak data-structures, to allow the cleaning of stale references in Collect::trace, where fully upgrading a GcWeak isn't possible.

An alternative API would be to expose upgrade methods on CollectionContext instead, but this eems much more constraining on the possible space of GC algorithms.