We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bb6eeb4 + f415392 commit 44630a4Copy full SHA for 44630a4
scheds/rust/scx_chaos/src/lib.rs
@@ -710,15 +710,13 @@ pub fn run(args: Args) -> Result<()> {
710
return stats::monitor(Duration::from_secs_f64(intv), shutdown);
711
}
712
713
- let stats_thread = if let Some(intv) = args.stats {
+ let stats_thread = args.stats.map(|intv| {
714
let shutdown = shutdown.clone();
715
716
- Some(thread::spawn(move || -> Result<()> {
+ thread::spawn(move || -> Result<()> {
717
stats::monitor(Duration::from_secs_f64(intv), shutdown)
718
- }))
719
- } else {
720
- None
721
- };
+ })
+ });
722
723
let scheduler_thread = thread::spawn({
724
let args = args.clone();
0 commit comments