原书出处
Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)
10 Chapter 10. Building an Async Server with No Dependencies 轮转轮询与空转
running with just the standard library! Note
Remember that our waker does not really do anything. We are polling our futures in our executor queue regardless. If you comment out the cx.waker().wake_by_ref(); line in the poll function of CountingFuture, you will get the exact same result, which is different from what happens in runtimes like smol or Tokio. This tells us that established runtimes are using the waker to only poll futures
that are to be woken. This means
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch10.html#id66
EPUB SHA-256:109ff0224da54833b0d49c82502e850845274913fe34a7168dcf36a9c075b4e0