Skip to content

Executing synchronous (non-async) scenarios concurrently #279

Answered by ilslv
kevgo asked this question in Q&A
Discussion options

You must be logged in to vote

@kevgo you can make your sync functions async by using tokio::spawn_blocking/tokio::block_in_place. You may also want to check something like async_scoped and moro for thread::scope-like API. We would like to do it ourselves, but unfortunately currently there is no runtime-agnostic way to do it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kevgo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested k::api Related to API (application interface) k::design Related to overall design and/or architecture
2 participants