Does Builder::on_thread_park on current thread scheduler guarantee to execute the function in main thread? #7369
Answered
by
Darksonn
ultimaweapon
asked this question in
Q&A
-
I need to do some works during the executor is idle but the problem is the object I need to pass to |
Beta Was this translation helpful? Give feedback.
Answered by
Darksonn
May 28, 2025
Replies: 1 comment 1 reply
-
It's guaranteed that (It does not run on |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ultimaweapon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's guaranteed that
on_thread_park
only runs on threads where you calledRuntime::block_on
. So you control where the callback runs.(It does not run on
Handle::block_on
threads.)