Skip to content

Commit

Permalink
bleh fix 32-bit code
Browse files Browse the repository at this point in the history
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
hawkw committed Apr 22, 2022
1 parent 7567ecc commit ca15b2f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tokio/src/runtime/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,12 @@ impl Id {
cfg_not_has_atomic_u64! {
pub(crate) fn next() -> Self {
use once_cell::sync::Lazy;
use crate::loom::Mutex;
static NEXT_ID: Lazy<Mutex<u64>> = Lazy(|| Mutex::new(1));
use crate::loom::sync::Mutex;

static NEXT_ID: Lazy<Mutex<u64>> = Lazy::new(|| Mutex::new(1));
let mut lock = NEXT_ID.lock();
let id = *lock;
lock += 1;
*lock += 1;
Self(id)
}
}
Expand Down

0 comments on commit ca15b2f

Please sign in to comment.