Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> They interpret await as "let promise run"

This is actually how rust handles async/await. If nothing is polling the future then the future is not running. If you want background execution like javascript then you need to hand it off to an executor (for example via `tokio::spawn`). Its actually pretty nice because then you can build a future and pass it around but you can decide if/when you want to execute it later.

That being said, you still wouldn't want to do a for loop awaiting each future.



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

Search: