Async-await on stable Rust!

rikki cattermole rikki at cattermole.co.nz
Fri Nov 8 02:13:28 UTC 2019


On 08/11/2019 3:04 PM, Heromyth wrote:
> See https://blog.rust-lang.org/2019/11/07/Async-await-stable.html.

https://rust-lang.github.io/async-book/02_execution/04_executor.html
https://rust-lang.github.io/async-book/03_async_await/01_chapter.html

So from what I can tell, there are two aspects to this.

1. Future's which have custom executors which you must explicitly call.
2. async/await which ties into the borrow checker and requires await to 
be called so pretty much stack only.

 From previous discussion this isn't what we want in D.
The previous designs discussed is an event loop poll based and heap 
allocate the closure.

It does mean that we need an event loop in druntime, but since I am 
expecting to write up an event loop soon for the graphics workgroup I'll 
add that to part of its requirements (with -betterC compatible).


More information about the Digitalmars-d mailing list