std: move ReentrantMutex to sync
This commit is contained in:
@@ -10,9 +10,8 @@ use crate::fmt;
|
|||||||
use crate::fs::File;
|
use crate::fs::File;
|
||||||
use crate::io::{self, BufReader, IoSlice, IoSliceMut, LineWriter, Lines};
|
use crate::io::{self, BufReader, IoSlice, IoSliceMut, LineWriter, Lines};
|
||||||
use crate::sync::atomic::{AtomicBool, Ordering};
|
use crate::sync::atomic::{AtomicBool, Ordering};
|
||||||
use crate::sync::{Arc, Mutex, MutexGuard, OnceLock};
|
use crate::sync::{Arc, Mutex, MutexGuard, OnceLock, ReentrantMutex, ReentrantMutexGuard};
|
||||||
use crate::sys::stdio;
|
use crate::sys::stdio;
|
||||||
use crate::sys_common::remutex::{ReentrantMutex, ReentrantMutexGuard};
|
|
||||||
|
|
||||||
type LocalStream = Arc<Mutex<Vec<u8>>>;
|
type LocalStream = Arc<Mutex<Vec<u8>>>;
|
||||||
|
|
||||||
|
|||||||
@@ -177,6 +177,8 @@ pub use self::lazy_lock::LazyLock;
|
|||||||
#[unstable(feature = "once_cell", issue = "74465")]
|
#[unstable(feature = "once_cell", issue = "74465")]
|
||||||
pub use self::once_lock::OnceLock;
|
pub use self::once_lock::OnceLock;
|
||||||
|
|
||||||
|
pub(crate) use self::remutex::{ReentrantMutex, ReentrantMutexGuard};
|
||||||
|
|
||||||
pub mod mpsc;
|
pub mod mpsc;
|
||||||
|
|
||||||
mod barrier;
|
mod barrier;
|
||||||
@@ -187,4 +189,5 @@ mod mutex;
|
|||||||
mod once;
|
mod once;
|
||||||
mod once_lock;
|
mod once_lock;
|
||||||
mod poison;
|
mod poison;
|
||||||
|
mod remutex;
|
||||||
mod rwlock;
|
mod rwlock;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
use super::{ReentrantMutex, ReentrantMutexGuard};
|
||||||
use crate::cell::RefCell;
|
use crate::cell::RefCell;
|
||||||
use crate::sync::Arc;
|
use crate::sync::Arc;
|
||||||
use crate::sys_common::remutex::{ReentrantMutex, ReentrantMutexGuard};
|
|
||||||
use crate::thread;
|
use crate::thread;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -27,7 +27,6 @@ pub mod lazy_box;
|
|||||||
pub mod memchr;
|
pub mod memchr;
|
||||||
pub mod once;
|
pub mod once;
|
||||||
pub mod process;
|
pub mod process;
|
||||||
pub mod remutex;
|
|
||||||
pub mod thread;
|
pub mod thread;
|
||||||
pub mod thread_info;
|
pub mod thread_info;
|
||||||
pub mod thread_local_dtor;
|
pub mod thread_local_dtor;
|
||||||
|
|||||||
Reference in New Issue
Block a user