avoid using the word 'initialized' to talk about that non-reentrant-capable state of the mutex

This commit is contained in:
Ralf Jung
2018-08-08 18:12:33 +02:00
parent 645388583c
commit 31bec788f4
7 changed files with 9 additions and 8 deletions

View File

@@ -940,7 +940,7 @@ pub struct ThreadId(u64);
impl ThreadId {
// Generate a new unique thread ID.
fn new() -> ThreadId {
// `GUARD` is never initialized fully, so it is UB to attempt to
// We never call `GUARD.init()`, so it is UB to attempt to
// acquire this mutex reentrantly!
static GUARD: mutex::Mutex = mutex::Mutex::new();
static mut COUNTER: u64 = 0;