Mark unpark() as #[inline].
This commit is contained in:
parent
ec13df4ec4
commit
f18f93d44c
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue