|
|
Subscribe / Log in / New account

Cyclic references in garbage collection

Cyclic references in garbage collection

Posted Jan 3, 2025 19:14 UTC (Fri) by kleptog (subscriber, #1183)
In reply to: Cyclic references in garbage collection by sionescu
Parent article: Preventing data races with Pony

An interesting side effect of the Erlang approach is that in practice, most threads (actors) do not live long enough to trigger the garbage collector. When they die you can simply destroy the stack+heap of that thread since you know it's unreferenced.

Pony can't take advantage of this trick though, but their approach is novel, like a cross between Erlang and Rust.

You don't use Erlang for performance (though the JIT they're working on helps a lot), you use it because throughput scales linearly with the number of CPUs. And you can connect multiple machines into a single large cluster without changing your program.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds