4 ms·
> 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 lik
by veber-alex 3y ago
> 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/ https://docs.rs/actix-rt/latest/actix_rt/
- fnordpiglet 3y agoYea this is exactly what I do. It makes everything much cleaner.