You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by ertosns December 6, 2024
allow_threads doesn't release gil for detached smol::Executor in background, for example the following code block only run in the main thread, and the gil doesn't seem to be released.
async fn executor_run() {
let ex = Arc::new(smol::Executor::new());
let fut = ex.spawn(async {
println!("executor run\n");
});
Python::with_gil(|gil| {
gil.allow_threads(|| {
fut.detach();
})
})
}
The text was updated successfully, but these errors were encountered:
Discussed in #4775
Originally posted by ertosns December 6, 2024
allow_threads doesn't release gil for detached smol::Executor in background, for example the following code block only run in the main thread, and the gil doesn't seem to be released.
The text was updated successfully, but these errors were encountered: