Skip to content

Commit

Permalink
Reduce SPIN_LIMIT in Backoff
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jul 21, 2022
1 parent 6baa072 commit 0362ffe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crossbeam-utils/src/backoff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ use crate::primitive::sync::atomic;
use core::cell::Cell;
use core::fmt;

const SPIN_LIMIT: u32 = 6;
// https://github.com/oneapi-src/oneTBB/blob/v2021.5.0/include/oneapi/tbb/detail/_utils.h#L46-L48
const SPIN_LIMIT: u32 = 4;
const YIELD_LIMIT: u32 = 10;

/// Performs exponential backoff in spin loops.
Expand Down

0 comments on commit 0362ffe

Please sign in to comment.