diff options
| author | Mica White <botahamec@outlook.com> | 2024-03-08 11:45:15 -0500 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2024-03-08 11:45:15 -0500 |
| commit | 6b4951ade670acbe3cb34b2002fbcd4b4e6a7300 (patch) | |
| tree | c800e9888ba649e2cff27cc1b8ae001c3632572d /README.md | |
| parent | cff337867884fc5d9eff80c77d41e64ee53c6115 (diff) | |
Replace ownership with mutable access
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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`. |
