Skip to content

Comment on Too dangerous for C++parent

Comments

Not every program that's written will even be multithreaded, and there's a significant cost to using atomic operations when you don't need them. What is the disadvantage of having non-atomic Rc be available?

And Rc can still be useful for multithreaded programs. Not every value needs to be shared between threads.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.