From 6b4951ade670acbe3cb34b2002fbcd4b4e6a7300 Mon Sep 17 00:00:00 2001 From: Mica White Date: Fri, 8 Mar 2024 11:45:15 -0500 Subject: Replace ownership with mutable access --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index b6bbd61..aa73f09 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ let data = data.lock(key); println!("{}", *data); ``` -Unlocking a mutex requires a `ThreadKey`. Each thread will be allowed to have one key at a time, but no more than that. The `ThreadKey` type is not cloneable or copyable. To get the key back out of a mutex, it must be unlocked. This means that only one thing can be locked at a time. +Unlocking a mutex requires a mutable reference to `ThreadKey`. Each thread will be allowed to have one key at a time, but no more than that. The `ThreadKey` type is not cloneable or copyable. This means that only one thing can be locked at a time. To lock multiple mutexes at a time, create a `LockGuard`. -- cgit v1.2.3