Skip to content

Commit

Permalink
+docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Oct 12, 2022
1 parent f2564c1 commit 1aa7a39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tokio/src/task/local.rs
Expand Up @@ -1020,6 +1020,12 @@ fn thread_id() -> Option<ThreadId> {
#[cfg(all(test, not(loom)))]
mod tests {
use super::*;

// Does a `LocalSet` running on a current-thread runtime...basically work?
//
// This duplicates a test in `tests/task_local_set.rs`, but because this is
// a lib test, it wil run under Miri, so this is necessary to catch stacked
// borrows violations in the `LocalSet` implementation.
#[test]
fn local_current_thread_scheduler() {
let f = async {
Expand Down

0 comments on commit 1aa7a39

Please sign in to comment.