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
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();
})
})
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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.
Beta Was this translation helpful? Give feedback.
All reactions