bugfix: Use AtomicUsize instead of U64 to count zombies for 32-bit compatibility

Fix #74.
This commit is contained in:
kennytm 2024-04-12 08:03:29 +08:00 committed by GitHub
parent 581c0a02c0
commit 06fb10ac23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ use async_task::Runnable;
use futures_lite::future;
use std::io;
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Mutex;
use std::task::{Context, Poll};
@ -22,7 +22,7 @@ pub(crate) struct Reaper {
recv: Receiver<Runnable>,
/// Number of zombie processes.
zombies: AtomicU64,
zombies: AtomicUsize,
}
impl Reaper {
@ -32,7 +32,7 @@ impl Reaper {
Self {
sender,
recv,
zombies: AtomicU64::new(0),
zombies: AtomicUsize::new(0),
}
}