Mark unpark() as #[inline].
This commit is contained in:
@@ -1086,6 +1086,7 @@ impl Thread {
|
|||||||
/// parked_thread.join().unwrap();
|
/// parked_thread.join().unwrap();
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[inline]
|
||||||
pub fn unpark(&self) {
|
pub fn unpark(&self) {
|
||||||
self.inner.parker.unpark();
|
self.inner.parker.unpark();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ impl Parker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn unpark(&self) {
|
pub fn unpark(&self) {
|
||||||
// Change PARKED=>NOTIFIED, EMPTY=>NOTIFIED, or NOTIFIED=>NOTIFIED, and
|
// Change PARKED=>NOTIFIED, EMPTY=>NOTIFIED, or NOTIFIED=>NOTIFIED, and
|
||||||
// wake the thread in the first case.
|
// wake the thread in the first case.
|
||||||
|
|||||||
Reference in New Issue
Block a user