about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorArno Haase <arno.haase@haase-consulting.com>2019-09-10 14:25:40 +0200
committerArno Haase <arno.haase@haase-consulting.com>2019-09-10 14:25:40 +0200
commit51c49e257322babe0426327102357877a9015f4d (patch)
treeeabaa855cbff4a611f4537465b7e3735daa87c77 /src/libcore
parent66e4b3447110bb06930f4a606e5a47c55ca73a8a (diff)
downloadrust-51c49e257322babe0426327102357877a9015f4d.tar.gz
rust-51c49e257322babe0426327102357877a9015f4d.zip
fixed linter error
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/hint.rs14
-rw-r--r--src/libcore/sync/atomic.rs14
2 files changed, 14 insertions, 14 deletions
diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs
index 861ad6b5420..53c576abb79 100644
--- a/src/libcore/hint.rs
+++ b/src/libcore/hint.rs
@@ -59,13 +59,13 @@ pub unsafe fn unreachable_unchecked() -> ! {
 /// busy-wait spin-loop without yielding control to the system's scheduler.
 ///
 /// Using a busy-wait spin-loop with `spin_loop` is ideally used in situations where a
-/// contended lock is held by another thread executed on a different CPU or core and where the waiting
-/// times are relatively small. Because entering busy-wait spin-loop does not trigger the system's
-/// scheduler, no overhead for switching threads occurs. However, if the thread holding the
-/// contended lock is running on the same CPU or core, the spin-loop is likely to occupy an entire CPU slice
-/// before switching to the thread that holds the lock. If the contending lock is held by a thread
-/// on the same CPU or core or if the waiting times for acquiring the lock are longer, it is often better to
-/// use [`std::thread::yield_now`].
+/// contended lock is held by another thread executed on a different CPU or core and where the
+/// waiting times are relatively small. Because entering busy-wait spin-loop does not trigger the
+/// system's scheduler, no overhead for switching threads occurs. However, if the thread holding the
+/// contended lock is running on the same CPU or core, the spin-loop is likely to occupy an entire
+/// CPU slice before switching to the thread that holds the lock. If the contending lock is held by
+/// a thread on the same CPU or core or if the waiting times for acquiring the lock are longer, it
+/// is often better to use [`std::thread::yield_now`].
 ///
 /// **Note**: On platforms that do not support receiving spin-loop hints this function does not
 /// do anything at all.
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs
index bdd045f7565..38339996090 100644
--- a/src/libcore/sync/atomic.rs
+++ b/src/libcore/sync/atomic.rs
@@ -134,13 +134,13 @@ use crate::hint::spin_loop;
 /// busy-wait spin-loop without yielding control to the system's scheduler.
 ///
 /// Using a busy-wait spin-loop with `spin_loop_hint` is ideally used in situations where a
-/// contended lock is held by another thread executed on a different CPU or core and where the waiting
-/// times are relatively small. Because entering busy-wait spin-loop does not trigger the system's
-/// scheduler, no overhead for switching threads occurs. However, if the thread holding the
-/// contended lock is running on the same CPU or core, the spin-loop is likely to occupy an entire CPU slice
-/// before switching to the thread that holds the lock. If the contending lock is held by a thread
-/// on the same CPU or core or if the waiting times for acquiring the lock are longer, it is often better to
-/// use [`std::thread::yield_now`].
+/// contended lock is held by another thread executed on a different CPU or core and where the
+/// waiting times are relatively small. Because entering busy-wait spin-loop does not trigger the
+/// system's scheduler, no overhead for switching threads occurs. However, if the thread holding the
+/// contended lock is running on the same CPU or core, the spin-loop is likely to occupy an entire
+/// CPU slice before switching to the thread that holds the lock. If the contending lock is held by
+/// a thread on the same CPU or core or if the waiting times for acquiring the lock are longer, it
+/// is often better to use [`std::thread::yield_now`].
 ///
 /// **Note**: On platforms that do not support receiving spin-loop hints this function does not
 /// do anything at all.