diff --git a/tokio/src/task/local.rs b/tokio/src/task/local.rs index 08d89c49c03..baab6805b6c 100644 --- a/tokio/src/task/local.rs +++ b/tokio/src/task/local.rs @@ -1160,9 +1160,14 @@ impl LocalState { #[track_caller] fn assert_called_from_owner_thread(&self) { - // FreeBSD has some weirdness around thread-local destruction. + // BSDs and Solarises has 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