|
|
|
|
|
by galkk
30 days ago
|
|
> Let the user manage locks themselves, and make sure the correct locks are acquired before mutating a database object. ??? This doesn't make sense. It's like saying "just implement it properly". what about distributed clients? what about _different_ clients? |
|
Also idk what the Rust suggestion is. Nothing in Rust would guard against this kind of race condition if you replicated the example over there. You can do mutex or even RwMutex on a single struct, but that doesn't force you to hold struct A's read mutex while you write to struct B.