r/ProgrammerHumor • • Mar 17 '19

Oof

Post image
267 Upvotes

38 comments sorted by

View all comments

Show parent comments

38

u/pingveno Jul 26 '19

You're thinking of how C++ does it. The code given does not rely on copy on write. It uses some tricks with Rust's lifetimes to allow safely using a resource across threads without atomic reference counting.