4 ms·
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
by pknopf 7y ago
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.
- PrototypeNM1 7y agoIirc RefCell is marked !Sync, I thought Mutex was the multithreadong analog?
- steveklabnik 7y agoThat's correct.