News for hackers. Stuff that matters.
Re:gRPC benchmark results by paavohtl on Saturday May 08, 2021 @11:53AM (#27088247)
You only need atomic reference counting if you're sharing objects between multiple threads, but if you use an object from one thread at a time then non-atomic inc/dec is enough. Rust allows you to make the choice between the two kinds and the compiler can infer which kind you need to use.
Re:gRPC benchmark results by qalmakka on Saturday May 08, 2021 @05:00PM (#27090628)
Yeah - Rust can, because it also ensures you can't exchange data unsafely between threads, but C++ can't. That's why `std::shared_ptr` has to be thread-safe.