News for hackers. Stuff that matters.
Re:Was Rust Worth It? by pornel on Wednesday October 25, 2023 @10:52PM (#38021134)
That ChatGPT suggestion is dodgy. Tokio is going to complain when you create a runtime while in async runtime, and refuse block_on in an async context.

You can have multiple runtimes, but create them ahead of time, in synchronous main, and keep a Handle to them.

But you probably need: https://docs.rs/tokio/latest/tokio/task/struct.LocalSet.html

There are no comments on this comment yet.