News for hackers. Stuff that matters.
Re:Async Rust Is A Bad Language by veber-alex on Friday September 08, 2023 @06:22PM (#37440074)
> So you’re stuck choosing a single CPU or having to write send and sync everywhere. There’s a lot of use cases where you would want a thread-per-core model like Glommio to take advantage of multiple cores while still being able to write code like it’s a single thread.

No your not, you spawn a runtime on each thread and use spawn_local on each runtime. This is how actix-web works and it uses tokio under the hood.

https://docs.rs/actix-rt/latest/actix_rt/

Re:Async Rust Is A Bad Language by fnordpiglet on Friday September 08, 2023 @07:27PM (#37440541)
Yea this is exactly what I do. It makes everything much cleaner.