News for hackers. Stuff that matters.
Re:Was Rust Worth It? by pornel on Wednesday October 25, 2023 @10:41PM (#38021072)
The way closures made it easy to encapsulate code and state in an object you can run later, async encapsulates code and state for ability to run and pause or cancel externally.

This is handy for I/O that can be interleaved and cancelled. You can (ab)use it for other things like generators or various DIY multitasking operations.

But I think OP just meant async for typical I/O, networking and DB interfaces. And yes, this usually implies the Tokio dependency.

There are no comments on this comment yet.