Skip to content

Commit 51c49e2

Browse files
author
Arno Haase
committed
fixed linter error
1 parent 66e4b34 commit 51c49e2

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/libcore/hint.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ pub unsafe fn unreachable_unchecked() -> ! {
5959
/// busy-wait spin-loop without yielding control to the system's scheduler.
6060
///
6161
/// Using a busy-wait spin-loop with `spin_loop` is ideally used in situations where a
62-
/// contended lock is held by another thread executed on a different CPU or core and where the waiting
63-
/// times are relatively small. Because entering busy-wait spin-loop does not trigger the system's
64-
/// scheduler, no overhead for switching threads occurs. However, if the thread holding the
65-
/// contended lock is running on the same CPU or core, the spin-loop is likely to occupy an entire CPU slice
66-
/// before switching to the thread that holds the lock. If the contending lock is held by a thread
67-
/// on the same CPU or core or if the waiting times for acquiring the lock are longer, it is often better to
68-
/// use [`std::thread::yield_now`].
62+
/// contended lock is held by another thread executed on a different CPU or core and where the
63+
/// waiting times are relatively small. Because entering busy-wait spin-loop does not trigger the
64+
/// system's scheduler, no overhead for switching threads occurs. However, if the thread holding the
65+
/// contended lock is running on the same CPU or core, the spin-loop is likely to occupy an entire
66+
/// CPU slice before switching to the thread that holds the lock. If the contending lock is held by
67+
/// a thread on the same CPU or core or if the waiting times for acquiring the lock are longer, it
68+
/// is often better to use [`std::thread::yield_now`].
6969
///
7070
/// **Note**: On platforms that do not support receiving spin-loop hints this function does not
7171
/// do anything at all.

src/libcore/sync/atomic.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ use crate::hint::spin_loop;
134134
/// busy-wait spin-loop without yielding control to the system's scheduler.
135135
///
136136
/// Using a busy-wait spin-loop with `spin_loop_hint` is ideally used in situations where a
137-
/// contended lock is held by another thread executed on a different CPU or core and where the waiting
138-
/// times are relatively small. Because entering busy-wait spin-loop does not trigger the system's
139-
/// scheduler, no overhead for switching threads occurs. However, if the thread holding the
140-
/// contended lock is running on the same CPU or core, the spin-loop is likely to occupy an entire CPU slice
141-
/// before switching to the thread that holds the lock. If the contending lock is held by a thread
142-
/// on the same CPU or core or if the waiting times for acquiring the lock are longer, it is often better to
143-
/// use [`std::thread::yield_now`].
137+
/// contended lock is held by another thread executed on a different CPU or core and where the
138+
/// waiting times are relatively small. Because entering busy-wait spin-loop does not trigger the
139+
/// system's scheduler, no overhead for switching threads occurs. However, if the thread holding the
140+
/// contended lock is running on the same CPU or core, the spin-loop is likely to occupy an entire
141+
/// CPU slice before switching to the thread that holds the lock. If the contending lock is held by
142+
/// a thread on the same CPU or core or if the waiting times for acquiring the lock are longer, it
143+
/// is often better to use [`std::thread::yield_now`].
144144
///
145145
/// **Note**: On platforms that do not support receiving spin-loop hints this function does not
146146
/// do anything at all.

0 commit comments

Comments
 (0)