std: replace generic thread parker with explicit no-op parker
This commit is contained in:
@@ -22,6 +22,7 @@ pub mod thread;
|
||||
#[cfg(target_thread_local)]
|
||||
pub mod thread_local_dtor;
|
||||
pub mod thread_local_key;
|
||||
pub mod thread_parking;
|
||||
pub mod time;
|
||||
|
||||
mod common;
|
||||
|
||||
11
library/std/src/sys/unsupported/thread_parking.rs
Normal file
11
library/std/src/sys/unsupported/thread_parking.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use crate::pin::Pin;
|
||||
use crate::time::Duration;
|
||||
|
||||
pub struct Parker {}
|
||||
|
||||
impl Parker {
|
||||
pub unsafe fn new_in_place(_parker: *mut Parker) {}
|
||||
pub unsafe fn park(self: Pin<&Self>) {}
|
||||
pub unsafe fn park_timeout(self: Pin<&Self>, _dur: Duration) {}
|
||||
pub fn unpark(self: Pin<&Self>) {}
|
||||
}
|
||||
@@ -49,6 +49,8 @@ pub mod thread;
|
||||
pub mod thread_local_dtor;
|
||||
#[path = "../unsupported/thread_local_key.rs"]
|
||||
pub mod thread_local_key;
|
||||
#[path = "../unsupported/thread_parking.rs"]
|
||||
pub mod thread_parking;
|
||||
pub mod time;
|
||||
|
||||
#[path = "../unsupported/common.rs"]
|
||||
|
||||
@@ -70,6 +70,8 @@ cfg_if::cfg_if! {
|
||||
pub mod once;
|
||||
#[path = "../unsupported/thread.rs"]
|
||||
pub mod thread;
|
||||
#[path = "../unsupported/thread_parking.rs"]
|
||||
pub mod thread_parking;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user