News for hackers. Stuff that matters.
Re:GC Fun at Twitch by zozbot234 on Saturday November 16, 2019 @03:54AM (#21551690)
> garbage collectors for Rust that function reasonably are still pretty experimental

You can also use something like https://github.com/artichoke/cactusref - which provides an equivalent of Rc<T> with nearly-seamless, timely detection and collection of deallocation cycles. This gives you the equivalent of full GC, but using a "zero-overhead" approach that integrates more cleanly with how Rust idiomatically works.

Re:GC Fun at Twitch by pjmlp on Saturday November 16, 2019 @06:05AM (#21552038)
Does it prevent stack overflows and stop-the-world delays in complex data structures?

Two common problems in most reference counting implementations.

Re:GC Fun at Twitch by jashmatthews on Saturday November 16, 2019 @07:47AM (#21552401)
IIUC Rust stack overflows are actually checked, hit a guard page, and unwind the stack https://github.com/rust-lang/compiler-builtins/blob/master/s...

A cactusref is owned by a single thread so there's no STW issue, but you also can't share them mutably between threads like structures available in some GCed languages.

Re:GC Fun at Twitch by pjmlp on Saturday November 16, 2019 @08:46AM (#21552587)
Thanks