Skip to content

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
Discussion options

You must be logged in to vote

It's guaranteed that on_thread_park only runs on threads where you called Runtime::block_on. So you control where the callback runs.

(It does not run on Handle::block_on threads.)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ultimaweapon
Comment options

Answer selected by ultimaweapon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants