Skip to content

Commit 4bb0ddf

Browse files
committed
Mark unpark() as #[inline].
1 parent efa2546 commit 4bb0ddf

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

library/std/src/thread/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,7 @@ impl Thread {
10741074
/// parked_thread.join().unwrap();
10751075
/// ```
10761076
#[stable(feature = "rust1", since = "1.0.0")]
1077+
#[inline]
10771078
pub fn unpark(&self) {
10781079
self.inner.parker.unpark();
10791080
}

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

Lines changed: 1 addition & 0 deletions
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)