diff --git a/tokio/src/task/local.rs b/tokio/src/task/local.rs index 08d89c49c03..533acdb3cb9 100644 --- a/tokio/src/task/local.rs +++ b/tokio/src/task/local.rs @@ -1160,9 +1160,15 @@ impl LocalState { #[track_caller] fn assert_called_from_owner_thread(&self) { - // FreeBSD has some weirdness around thread-local destruction. + // BSDs, illumos, and Solaris have some weirdness around thread-local + // destruction. // TODO: remove this hack when thread id is cleaned up - #[cfg(not(any(target_os = "openbsd", target_os = "freebsd")))] + #[cfg(not(any( + target_os = "openbsd", + target_os = "freebsd", + target_os = "illumos", + target_os = "solaris", + )))] debug_assert!( // if we couldn't get the thread ID because we're dropping the local // data, skip the assertion --- the `Drop` impl is not going to be