A W
Oleg Yumhttps://www.reddit.com/r/bun/comments/1tctxxl/rewrite_bun_in_rust_has_been_merged/
we need someone to port python with types to rust now lol
C Don't do it. Running a synchronous function in async context breaks your loop in a way that the other concurrent functions won't run until you're done. This is likely what you have experienced when trying to make it work. Run the code in a different thread, that puts it outside of the context of the asynchronous loop. Try asyncio.to_thread and asyncio.gather.A C asyncio.to_thread is the abstraction. The answer only changes if the synchronous function is developer-owned and can be converted to a native asynchronous function. Unless of course there's an option to just pick an asynchronous library (assuming the synchronous function comes from a library) to replace the synchronous function.G
G
C G