4 ms·
Rust async functions are also different here. They don't run the code, they create a Future structure in it's initial state. Contrary to e.g. JavaScript, it doe
by Argorak 7y ago
Rust async functions are also different here. They don't run the code, they create a Future structure in it's initial state. Contrary to e.g. JavaScript, it doesn't start to run until you end up putting it on an executor. So the actual function call does something very different from what happens in other languages.
It's sometimes called "cold futures".
- aphexairlines 7y agoSounds similar to what the Scala ecosystem calls Tasks. https://monix.io/docs/3x/eval/task.html#introduction https://monix.io/docs/3x/eval/task.html#introduction https://github.com/traneio/arrows#using-task https://github.com/traneio/arrows#using-task
- Argorak 7y agoIt's similar in some ways, yes. As always, details and labels differ.