Repository: tauri
Issue: unsafe precondition violation in DispatcherMainThreadContext
Labels: type: bug,status: needs triage

### Describe the bug

We are experiencing `Unsafe Precondition Violation`s during development. I could identify the check being triggered while cloning `DispatcherMainThreadContext`. Specifically while cloning the inner `global_shortcut_manager` which is an `Rc`. 
`DispatcherMainThreadContext` impls `Send` and `Sync` manually with this safety explanation:
`// SAFETY: we ensure this type is only used on the main thread.`. It seems that our code somehow managed to find a way to violate the rules.



### Possible solution
I forked this repo and managed to fix the issue by replacing the `Rc` with an `Arc`. I don't know how big of an impact this has on performance. If you decide that this is the way to go I am happy to create a PR.

### Note:
This issue was introduced by rust 1.78.0 and should only happen in debug builds.
See: https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html#asserting-unsafe-preconditions

### Reproduction

Unfortunately I don't have the time to create a minimal reproducable example but wanted you know anyway.

### Expected behavior

Condition check to pass

### Full `tauri info` output

```text
$ tauri info

[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 125.0.2535.85
    ✔ MSVC: Visual Studio Professional 2019
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 21.6.1
    - yarn: 1.22.19
    - npm: 10.2.4

[-] Packages
    - tauri [RUST]: git+https://dataton@dev.azure.com/dataton/7nx/_git/tauri-1.6.8-patch?branch=patch#16ab86d4988bf65aa5c299cf8fb13720b7291025 (1.6.8) (no manifest)
    - tauri-build [RUST]: git+https://dataton@dev.azure.com/dataton/7nx/_git/tauri-1.6.8-patch?branch=patch#16ab86d4988bf65aa5c299cf8fb13720b7291025 (1.5.2) (no manifest)
    - wry [RUST]: 0.24.10 (no manifest)
    - tao [RUST]: git+https://dataton@dev.azure.com/dataton/7nx/_git/tao2?branch=patched-v0.16.7#cb652e9a47d1e57bfcb9e04c6e104e85606b080a (0.16.7) (no manifest)
    - @tauri-apps/api [NPM]: 1.5.6
    - @tauri-apps/cli [NPM]: 1.5.14

[-] App
    - build-type: bundle
    - CSP: default-src 'self' 'unsafe-inline'; img-src data: asset: https://asset.localhost https://tauri.localhost; connect-src ws://localhost:*;
    - distDir: ../dist
    - devPath: http://localhost:8080/
    - framework: Vue.js (Quasar)
    - bundler: Vite
Done in 3.72s.
```


### Stack trace

```text
thread 'tokio-runtime-worker' panicked at library\core\src\panicking.rs:156:5:
unsafe precondition(s) violated: hint::assert_unchecked must never be called when the condition is false
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\panicking.rs:645
   1: core::panicking::panic_nounwind_fmt::runtime
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\core\src\panicking.rs:110
   2: core::panicking::panic_nounwind_fmt
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\core\src\panicking.rs:123
   3: core::panicking::panic_nounwind
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\core\src\panicking.rs:156
   4: core::hint::assert_unchecked::precondition_check
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\intrinsics.rs:2799
   5: alloc::rc::RcInnerPtr::inc_strong<alloc::rc::RcBox<std::sync::mutex::Mutex<tao::global_shortcut::ShortcutManager> > >
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\alloc\src\rc.rs:3348
   6: alloc::rc::impl$27::clone<std::sync::mutex::Mutex<tao::global_shortcut::ShortcutManager>,alloc::alloc::Global>
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\alloc\src\rc.rs:2198
   7: tauri_runtime_wry::impl$56::clone<enum2$<tauri::EventLoopMessage> >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-runtime-wry-0.14.5\src\lib.rs:287
   8: tauri_runtime_wry::impl$53::clone<enum2$<tauri::EventLoopMessage> >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-runtime-wry-0.14.5\src\lib.rs:198
   9: tauri_runtime_wry::impl$68::clone<enum2$<tauri::EventLoopMessage> >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-runtime-wry-0.14.5\src\lib.rs:1245
  10: tauri_runtime::window::impl$3::clone<enum2$<tauri::EventLoopMessage>,tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-runtime-0.14.2\src\window.rs:377
  11: tauri::window::impl$6::clone<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-1.6.2\src\window.rs:757
  12: core::clone::Clone::clone<tuple$<alloc::string::String,tauri::window::Window<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > > > >
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\clone.rs:160
  13: hashbrown::raw::RawTable<tuple$<alloc::string::String,tauri::window::Window<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > > >,alloc::alloc::Global>::clone_from_impl<tuple$<alloc::string::String,tauri::window::Window<tauri_runtime_wry::Wry<enum2
             at /rust/deps\hashbrown-0.14.3\src\raw\mod.rs:3601
  14: hashbrown::raw::impl$14::clone_from_spec<tuple$<alloc::string::String,tauri::window::Window<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > > >,alloc::alloc::Global>
             at /rust/deps\hashbrown-0.14.3\src\raw\mod.rs:3550
  15: hashbrown::raw::impl$13::clone<tuple$<alloc::string::String,tauri::window::Window<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > > >,alloc::alloc::Global>
             at /rust/deps\hashbrown-0.14.3\src\raw\mod.rs:3469
  16: hashbrown::map::impl$0::clone<alloc::string::String,tauri::window::Window<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > >,std::hash::random::RandomState,alloc::alloc::Global>
             at /rust/deps\hashbrown-0.14.3\src\map.rs:199
  17: std::collections::hash::map::impl$4::clone<alloc::string::String,tauri::window::Window<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > >,std::hash::random::RandomState>
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\collections\hash\map.rs:1270
  18: tauri::manager::WindowManager<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > >::windows<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-1.6.2\src\manager.rs:1241
  19: tauri::manager::WindowManager<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > >::emit_filter<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> >,ref$<enum2$<serde_json::value::Value> >,tauri::Manager::emit_all::closure_env$0<tauri::app::AppH
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-1.6.2\src\manager.rs:1164
  20: tauri::Manager::emit_all<tauri::app::AppHandle<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > >,tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> >,ref$<enum2$<serde_json::value::Value> > >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-1.6.2\src\lib.rs:636
  21: producer::event::impl$0::emit::closure$0<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > >
             at .\src\event.rs:90
  22: enum2$<core::result::Result<enum2$<serde_json::value::Value>,alloc::boxed::Box<dyn$<core::error::Error,core::marker::Send,core::marker::Sync>,alloc::alloc::Global> > >::and_then<enum2$<serde_json::value::Value>,alloc::boxed::Box<dyn$<core::error::Error,co
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\result.rs:1321
  23: producer::event::impl$0::emit<tauri_runtime_wry::Wry<enum2$<tauri::EventLoopMessage> > >
             at .\src\event.rs:82
  24: producer::event::impl$3::emit
             at .\src\event.rs:131
  25: producer::state::impl$5::upload_asset::async_fn$0::closure$1
             at .\src\state.rs:2138
  26: asset_manager_client::stateless_client::impl$1::upload_asset_with_progress_v2::async_fn$0::async_block$1<producer::state::impl$5::upload_asset::async_fn$0::closure_env$1>
             at D:\dev\7nx\rust_source\asset-server\client\src\stateless_client.rs:337
  27: futures_util::future::maybe_done::impl$3::poll<enum2$<asset_manager_client::stateless_client::impl$1::upload_asset_with_progress_v2::async_fn$0::async_block_env$1<producer::state::impl$5::upload_asset::async_fn$0::closure_env$1> > >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\futures-util-0.3.30\src\future\maybe_done.rs:95
  28: asset_manager_client::stateless_client::impl$1::upload_asset_with_progress_v2::async_fn$0::closure$2<producer::state::impl$5::upload_asset::async_fn$0::closure_env$1>
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\futures-util-0.3.30\src\async_await\join_mod.rs:95
  29: futures_util::future::poll_fn::impl$2::poll<tuple$<enum2$<core::result::Result<tuple$<>,alloc::boxed::Box<dyn$<core::error::Error,core::marker::Send,core::marker::Sync>,alloc::alloc::Global> > >,tuple$<> >,asset_manager_client::stateless_client::impl$1::u
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\futures-util-0.3.30\src\future\poll_fn.rs:56
  30: asset_manager_client::stateless_client::impl$1::upload_asset_with_progress_v2::async_fn$0<producer::state::impl$5::upload_asset::async_fn$0::closure_env$1>
             at D:\dev\7nx\rust_source\asset-server\client\src\stateless_client.rs:346
  31: asset_manager_client::stateless_client::impl$1::upload_asset_with_progress::async_fn$0<producer::state::impl$5::upload_asset::async_fn$0::closure_env$1>
             at D:\dev\7nx\rust_source\asset-server\client\src\stateless_client.rs:123
  32: producer::state::impl$5::upload_asset::async_fn$0
             at .\src\state.rs:2150
  33: producer::state::impl$5::perform_asset_action::async_fn$0
             at .\src\state.rs:1844
  34: producer::action::perform_action_impl::async_fn$0::async_block$4
             at .\src\action.rs:535
  35: core::future::future::impl$1::poll<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::Global> >
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\future\future.rs:123
  36: tokio::runtime::task::core::impl$6::poll::closure$0<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::Global> >,alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Han
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\core.rs:328
  37: tokio::loom::std::unsafe_cell::UnsafeCell<enum2$<tokio::runtime::task::core::Stage<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::Global> > > > >::with_mut
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\loom\std\unsafe_cell.rs:16
  38: tokio::runtime::task::core::Core<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::Global> >,alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle,alloc::alloc::G
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\core.rs:317
  39: tokio::runtime::task::harness::poll_future::closure$0<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::Global> >,alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::H
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\harness.rs:485
  40: core::panic::unwind_safe::impl$25::call_once<enum2$<core::task::poll::Poll<tuple$<> > >,tokio::runtime::task::harness::poll_future::closure_env$0<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\panic\unwind_safe.rs:272
  41: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::poll_future::closure_env$0<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::G
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\panicking.rs:552
  42: std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::impl$2::complete::closure_env$0<enum2$<producer::state::impl$4::update_player_timelines_impl::async_block_env$2>,alloc::sync::Arc<tokio::runtime::sched
  43: std::panicking::try<enum2$<core::task::poll::Poll<tuple$<> > >,core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::poll_future::closure_env$0<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\panicking.rs:516
  44: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::poll_future::closure_env$0<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::Globa
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\panic.rs:146
  45: tokio::runtime::task::harness::poll_future<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::Global> >,alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle,alloc
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\harness.rs:473
  46: tokio::runtime::task::harness::Harness<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::Global> >,alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle,alloc::al
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\harness.rs:208
  47: tokio::runtime::task::harness::Harness<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::Global> >,alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle,alloc::al
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\harness.rs:153
  48: tokio::runtime::task::raw::poll<core::pin::Pin<alloc::boxed::Box<enum2$<producer::action::perform_action_impl::async_fn$0::async_block_env$4>,alloc::alloc::Global> >,alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle,alloc::alloc::Gl
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\raw.rs:271
  49: tokio::runtime::task::raw::RawTask::poll
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\raw.rs:201
  50: tokio::runtime::task::LocalNotified<alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle,alloc::alloc::Global> >::run<alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle,alloc::alloc::Global> >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\mod.rs:427
  51: tokio::runtime::scheduler::multi_thread::worker::impl$1::run_task::closure$0
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\scheduler\multi_thread\worker.rs:639
  52: tokio::runtime::coop::with_budget
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\coop.rs:107
  53: tokio::runtime::coop::budget
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\coop.rs:73
  54: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\scheduler\multi_thread\worker.rs:575
  55: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\scheduler\multi_thread\worker.rs:538
  56: tokio::runtime::scheduler::multi_thread::worker::run::closure$0::closure$0
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\scheduler\multi_thread\worker.rs:491
  57: tokio::runtime::context::scoped::Scoped<enum2$<tokio::runtime::scheduler::Context> >::set<enum2$<tokio::runtime::scheduler::Context>,tokio::runtime::scheduler::multi_thread::worker::run::closure$0::closure_env$0,tuple$<> >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\context\scoped.rs:40
  58: tokio::runtime::context::set_scheduler::closure$0<tuple$<>,tokio::runtime::scheduler::multi_thread::worker::run::closure$0::closure_env$0>
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\context.rs:176
  59: std::thread::local::LocalKey<tokio::runtime::context::Context>::try_with<tokio::runtime::context::Context,tokio::runtime::context::set_scheduler::closure_env$0<tuple$<>,tokio::runtime::scheduler::multi_thread::worker::run::closure$0::closure_env$0>,tuple$
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\thread\local.rs:284
  60: std::thread::local::LocalKey<tokio::runtime::context::Context>::with<tokio::runtime::context::Context,tokio::runtime::context::set_scheduler::closure_env$0<tuple$<>,tokio::runtime::scheduler::multi_thread::worker::run::closure$0::closure_env$0>,tuple$<> >
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\thread\local.rs:260
  61: tokio::runtime::context::set_scheduler<tuple$<>,tokio::runtime::scheduler::multi_thread::worker::run::closure$0::closure_env$0>
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\context.rs:176
  62: tokio::runtime::scheduler::multi_thread::worker::run::closure$0
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\scheduler\multi_thread\worker.rs:486
  63: tokio::runtime::context::runtime::enter_runtime<tokio::runtime::scheduler::multi_thread::worker::run::closure_env$0,tuple$<> >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\context\runtime.rs:65
  64: tokio::runtime::scheduler::multi_thread::worker::run
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\scheduler\multi_thread\worker.rs:478
  65: tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure$0
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\scheduler\multi_thread\worker.rs:447
  66: tokio::runtime::blocking::task::impl$2::poll<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0,tuple$<> >
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\blocking\task.rs:42
  67: tokio::runtime::task::core::impl$6::poll::closure$0<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0>,tokio::runtime::blocking::schedule::BlockingSchedule>
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\core.rs:328
  68: tokio::loom::std::unsafe_cell::UnsafeCell<enum2$<tokio::runtime::task::core::Stage<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0> > > >::with_mut
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\loom\std\unsafe_cell.rs:16
  69: tokio::runtime::task::core::Core<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0>,tokio::runtime::blocking::schedule::BlockingSchedule>::poll<tokio::runtime::blocking::task::Block
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\core.rs:317
  70: tokio::runtime::task::harness::poll_future::closure$0<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0>,tokio::runtime::blocking::schedule::BlockingSchedule>
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\harness.rs:485
  71: core::panic::unwind_safe::impl$25::call_once<enum2$<core::task::poll::Poll<tuple$<> > >,tokio::runtime::task::harness::poll_future::closure_env$0<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch:
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\panic\unwind_safe.rs:272
  72: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::poll_future::closure_env$0<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0>,
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\panicking.rs:552
  73: std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::cancel_task::closure_env$0<tokio::runtime::blocking::task::BlockingTask<tokio::io::blocking::impl$0::poll_read::closure_env$0<tokio::process::imp::ArcF
  74: std::panicking::try<enum2$<core::task::poll::Poll<tuple$<> > >,core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::poll_future::closure_env$0<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worke
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\panicking.rs:516
  75: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::poll_future::closure_env$0<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0>,toki
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\panic.rs:146
  76: tokio::runtime::task::harness::poll_future<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0>,tokio::runtime::blocking::schedule::BlockingSchedule>
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\harness.rs:473
  77: tokio::runtime::task::harness::Harness<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0>,tokio::runtime::blocking::schedule::BlockingSchedule>::poll_inner<tokio::runtime::blocking:
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\harness.rs:208
  78: tokio::runtime::task::harness::Harness<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0>,tokio::runtime::blocking::schedule::BlockingSchedule>::poll<tokio::runtime::blocking::task:
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\harness.rs:153
  79: tokio::runtime::task::raw::poll<tokio::runtime::blocking::task::BlockingTask<tokio::runtime::scheduler::multi_thread::worker::impl$0::launch::closure_env$0>,tokio::runtime::blocking::schedule::BlockingSchedule>
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\raw.rs:271
  80: tokio::runtime::task::raw::RawTask::poll
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\raw.rs:201
  81: tokio::runtime::task::UnownedTask<tokio::runtime::blocking::schedule::BlockingSchedule>::run<tokio::runtime::blocking::schedule::BlockingSchedule>
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\task\mod.rs:464
  82: tokio::runtime::blocking::pool::Task::run
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\blocking\pool.rs:159
  83: tokio::runtime::blocking::pool::Inner::run
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\blocking\pool.rs:513
  84: tokio::runtime::blocking::pool::impl$6::spawn_thread::closure$0
             at D:\dev\cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\blocking\pool.rs:471
  85: core::hint::black_box
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\hint.rs:337
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```


### Additional context

```
stable-x86_64-pc-windows-msvc (default)
rustc 1.78.0 (9b00956e5 2024-04-29)
```