Re:Why Discord is switching from Go to Rust
by int_19h on Tuesday February 04, 2020 @06:15PM
(#22242205)
How do you know that they exist, if you're not scanning that memory?
Re:Why Discord is switching from Go to Rust
by zozbot234 on Tuesday February 04, 2020 @07:29PM
(#22242764)
The data structure code can take care of this by registering GC roots with the garbage collector (and de-registering them if an external reference changes). It's no different in principle than any other smart pointer.
Re:Why Discord is switching from Go to Rust
by tatersolid on Tuesday February 04, 2020 @09:56PM
(#22243606)
> You can treat external references as GC roots.
Which brings you back to doing an expensive scan of the large off-heap data structure you were trying to avoid.
You can treat external references as GC roots.