Skip to content

Commit 6d6521e

Browse files
Waitee: unique upgraded from usize to u64 (#84)
which should ensure it never rolls over Co-authored-by: Yoshua Wuyts <[email protected]>
1 parent 5066a25 commit 6d6521e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/runtime/reactor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ impl AsyncPollable {
4040
}
4141
/// Create a Future that waits for the Pollable's readiness.
4242
pub fn wait_for(&self) -> WaitFor {
43-
use std::sync::atomic::{AtomicUsize, Ordering};
44-
static COUNTER: AtomicUsize = AtomicUsize::new(0);
43+
use std::sync::atomic::{AtomicU64, Ordering};
44+
static COUNTER: AtomicU64 = AtomicU64::new(0);
4545
let unique = COUNTER.fetch_add(1, Ordering::Relaxed);
4646
WaitFor {
4747
waitee: Waitee {
@@ -58,7 +58,7 @@ struct Waitee {
5858
/// This needs to be a reference counted registration, because it may outlive the AsyncPollable
5959
/// &self that it was created from.
6060
pollable: AsyncPollable,
61-
unique: usize,
61+
unique: u64,
6262
}
6363

6464
/// A Future that waits for the Pollable's readiness.

0 commit comments

Comments
 (0)