]> git.lizzy.rs Git - rust.git/commitdiff
Mark unpark() as #[inline].
authorMara Bos <m-ou.se@m-ou.se>
Sat, 19 Sep 2020 12:54:52 +0000 (14:54 +0200)
committerMara Bos <m-ou.se@m-ou.se>
Sun, 27 Sep 2020 09:56:43 +0000 (11:56 +0200)
library/std/src/thread/mod.rs
library/std/src/thread/parker/linux.rs

index a5a8d5c9fbbc52c04faa579a98bc9a123bf3b61a..45430e58cbbc7da38e71945617b28308d2c8da40 100644 (file)
@@ -1086,6 +1086,7 @@ pub(crate) fn new(name: Option<String>) -> Thread {
     /// parked_thread.join().unwrap();
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[inline]
     pub fn unpark(&self) {
         self.inner.parker.unpark();
     }
index 05142b88c73fa0454682876501bce2b2b6de3acf..2e238dcdc0b02b8a6dc4cd1c156fd14db8df24af 100644 (file)
@@ -57,6 +57,7 @@ pub unsafe fn park_timeout(&self, timeout: Duration) {
         }
     }
 
+    #[inline]
     pub fn unpark(&self) {
         // Change PARKED=>NOTIFIED, EMPTY=>NOTIFIED, or NOTIFIED=>NOTIFIED, and
         // wake the thread in the first case.