mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 13:37:09 +00:00
parent
23d3d847d1
commit
7e3ac8475c
5
.changes/fix-async-runtime-stack-overflow.md
Normal file
5
.changes/fix-async-runtime-stack-overflow.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fix stack overflow on Windows on commands by changing the implementation of the `async_runtime::spawn` method.
|
||||
@ -103,7 +103,10 @@ impl Runtime {
|
||||
F::Output: Send + 'static,
|
||||
{
|
||||
match self {
|
||||
Self::Tokio(r) => JoinHandle::Tokio(r.spawn(task)),
|
||||
Self::Tokio(r) => {
|
||||
let _guard = r.enter();
|
||||
JoinHandle::Tokio(tokio::spawn(task))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -193,7 +196,10 @@ impl RuntimeHandle {
|
||||
F::Output: Send + 'static,
|
||||
{
|
||||
match self {
|
||||
Self::Tokio(h) => JoinHandle::Tokio(h.spawn(task)),
|
||||
Self::Tokio(h) => {
|
||||
let _guard = h.enter();
|
||||
JoinHandle::Tokio(tokio::spawn(task))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user