Skip to content

Commit

Permalink
turns out miri just hates localset
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Oct 12, 2022
1 parent ae0d49d commit f408481
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tokio/src/task/local.rs
Expand Up @@ -921,3 +921,22 @@ impl task::Schedule for Arc<Shared> {
}
}
}

#[cfg(test)]
mod tests {
use super::*;
#[test]
fn local_current_thread_scheduler() {
let f = async {
LocalSet::new()
.run_until(async {
spawn_local(async {}).await.unwrap();
})
.await;
};
crate::runtime::Builder::new_current_thread()
.build()
.expect("rt")
.block_on(f)
}
}

0 comments on commit f408481

Please sign in to comment.