3 ms·
> I'm a fan of Java's synchronized, and sometimes wish that Rust had something higher-level object-level synchronization primitive There are two big problems w
by grumpyprole 4y ago
> I'm a fan of Java's synchronized, and sometimes wish that Rust had something higher-level object-level synchronization primitive
There are two big problems with Java's synchronized that I can think of. It adds a monitor and therefore memory overhead to every single object. And it publically exposes the monitor allowing potentially bugs due to unintended use by clients.