File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,8 @@ use crate::sys::locks as sys;
107
107
/// *guard += 1;
108
108
/// ```
109
109
///
110
- /// It is sometimes necessary to manually drop the mutex guard or to create an inner scope
111
- /// to unlock it sooner than the end of the enclosing scope .
110
+ /// To unlock a mutex guard sooner than the end of the enclosing scope,
111
+ /// either create an inner scope or drop the guard manually .
112
112
///
113
113
/// ```
114
114
/// use std::sync::{Arc, Mutex};
@@ -153,7 +153,7 @@ use crate::sys::locks as sys;
153
153
/// // It's even more important here than in the threads because we `.join` the
154
154
/// // threads after that. If we had not dropped the mutex guard, a thread could
155
155
/// // be waiting forever for it, causing a deadlock.
156
- /// // As in the threads a block could have been used instead of calling the
156
+ /// // As in the threads, a block could have been used instead of calling the
157
157
/// // `drop` function.
158
158
/// drop(data);
159
159
/// // Here the mutex guard is not assigned to a variable and so, even if the
You can’t perform that action at this time.
0 commit comments