Hacker News new | past | comments | ask | show | jobs | submit login

RefCell has an internal semaphore. It's used specifically for multi threaded scenarios.

If someone is writing a multi threaded C app, they will likely be using semaphores as well. At least, they should be. Rust just enforces it.

So, I wouldn't say rust is "slower" in the regard.




Iirc RefCell is marked !Sync, I thought Mutex was the multithreadong analog?


That's correct.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: