Hacker News new | past | comments | ask | show | jobs | submit login

You can interchange async implementations in rust if you like, much like you can in C++ or other languages.

What becomes hard though is grappling with what that means:

- the stdlib doesn't know about async, so there are a variety of async stdlibs that may or may not be tightly coupled to an implementation.

- different runtimes may choose different threading models. Some may be single threaded-ish, some may be across threads. You could treat it all like it's across threads, but this does mean that there's another detail you need to consider when you're setting up your data.

- Io scheduling mixed with task scheduling is a choice of how an async stdlib is configured. There's advantages to having them coupled in that the runtime can sort checks on returns on the Io call as it cycles through the tasks, or put them all on a single thread queue etc... There's lots of patterns here that may have their own individual tradeoffs




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: