logoalt Hacker News

whytevuhuniyesterday at 6:34 PM1 replyview on HN

Here's a problem with that:

    Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.
https://play.rust-lang.org/?version=stable&mode=debug&editio...

Replies

tcfhgjyesterday at 6:53 PM

just pass around handles like you do in zig, alright?

also: spawn_blocking for blocking code

show 1 reply