mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
try loom again
This commit is contained in:
@@ -642,8 +642,12 @@ impl Core {
|
|||||||
/// a new worker will actually try to steal. The idea is to make sure not all
|
/// a new worker will actually try to steal. The idea is to make sure not all
|
||||||
/// workers will be trying to steal at the same time.
|
/// workers will be trying to steal at the same time.
|
||||||
fn steal_work(&mut self, worker: &Worker) -> Option<Notified> {
|
fn steal_work(&mut self, worker: &Worker) -> Option<Notified> {
|
||||||
|
#[cfg(not(loom))]
|
||||||
const ATTEMPTS: usize = 4;
|
const ATTEMPTS: usize = 4;
|
||||||
|
|
||||||
|
#[cfg(loom)]
|
||||||
|
const ATTEMPTS: usize = 1;
|
||||||
|
|
||||||
// Number of remotes
|
// Number of remotes
|
||||||
let num = worker.handle.shared.remotes.len();
|
let num = worker.handle.shared.remotes.len();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user