avoid using the word 'initialized' to talk about that non-reentrant-capable state of the mutex
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user