std: Rename unstable::mutex::Mutex to StaticNativeMutex.
This better reflects its purpose and design.
This commit is contained in:
@@ -144,9 +144,9 @@ Accessing environment variables is not generally threadsafe.
|
||||
Serialize access through a global lock.
|
||||
*/
|
||||
fn with_env_lock<T>(f: || -> T) -> T {
|
||||
use unstable::mutex::{Mutex, MUTEX_INIT};
|
||||
use unstable::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
|
||||
|
||||
static mut lock: Mutex = MUTEX_INIT;
|
||||
static mut lock: StaticNativeMutex = NATIVE_MUTEX_INIT;
|
||||
|
||||
unsafe {
|
||||
let _guard = lock.lock();
|
||||
|
||||
Reference in New Issue
Block a user