crosvm/cros_async
Takaya Saeki 293bdf3f24 cros_async: Rename Mutex to RwLock
Currently, cros_async::sync::Mutex is named "Mutex", but it is actually
a read-write lock, which is confusing to readers. As a result, readers
often mistakenly think that the part of the code which should use a
read-write lock is using a Mutex.

This change renames Mutex to RwLock to eliminate the confusion. In
addition, this change updates the documentation to recommend developers
to use the standard `futures:🔒:Mutex` if they just need a Mutex,
not a read-write lock.

BUG=None
TEST=./tools/dev_container ./tools/presubmit

Change-Id: Ic008d2448308066d9c5cabb0b6c499a62994e5e2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4546967
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Takaya Saeki <takayas@chromium.org>
2023-05-22 07:01:38 +00:00
..
src cros_async: Rename Mutex to RwLock 2023-05-22 07:01:38 +00:00
Cargo.toml