|
|
|
|
|
by inglor
418 days ago
|
|
> Unlike Node.js, Rust's Tokio allows us to spawn a new Task and run futures within it. Nice article! For future reference in Node.js this would be `worker_threads` or if you want a higher level tokio like API something like https://piscinajs.dev/ This has been possible in Node.js for quite a while -- Also for blocking I/O CPU bound parallelism I've found Rayon to be a pleasure. It has a few caveats but it leverages the Rust race condition checking well and it's very ergonomic. I happily mix it with `tokio` in an application that is CPU bound but has to perform some async I/O (due to the SDKs it uses) |
|