Skip to content

Commit f18f93d

Browse files
committed
Mark unpark() as #[inline].
1 parent ec13df4 commit f18f93d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

library/std/src/thread/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,7 @@ impl Thread {
10861086
/// parked_thread.join().unwrap();
10871087
/// ```
10881088
#[stable(feature = "rust1", since = "1.0.0")]
1089+
#[inline]
10891090
pub fn unpark(&self) {
10901091
self.inner.parker.unpark();
10911092
}

library/std/src/thread/parker/linux.rs

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ impl Parker {
5757
}
5858
}
5959

60+
#[inline]
6061
pub fn unpark(&self) {
6162
// Change PARKED=>NOTIFIED, EMPTY=>NOTIFIED, or NOTIFIED=>NOTIFIED, and
6263
// wake the thread in the first case.

0 commit comments

Comments
 (0)