futures-locks
futures-locks copied to clipboard
RwLock needs a task-fair locking policy
Because readers and writers are queued independently, read-heavy workloads will starve writers.
See parking_lot::RwLock for an example implementation that does not have this starvation problem with exclusive access.
Hm, you're right. I always intended to give writers priority over readers, but now that I review the code I see that I didn't actually do that. Thanks for pointing it out.