Rust 1.63: Scoped Threads

Because you could implement forget with an Rc cycle. The choices were:

  1. Stop guaranteeing memory safety;
  2. Declare leaking memory to be unsafe, which would mean types like Rc and Arc would be unsafe; or
  3. Declare leaking memory to be safe, which meant that the scoped thread interface was unsafe.

There are no other possibilities. Really, the third option was the only sane choice.

In practice there are more ways of in practice leaking memory (that is: it’s not leak-leaked, as it’s still reachable, but for practical purposes it’s leaked because nothing’s ever going to actually reach it), such as spawning a thread that just goes to sleep and sits on it forever, or just leaving it somewhere that won’t be freed.

/r/rust Thread Parent Link - twitter.com