Okay I lied when I said "last PR of today". Really really last one tho: `task::yield_now`. Similar to `thread::yield_now`, `task::yield_now` provides a mechanism to proactively yield CPU time so that other tasks can make progress! Yay for less latency!https://github.com/async-rs/async-std/pull/300 …
-
Show this thread
-
The way this works under the hood is quite simple: a future that yields Pending exactly once, and reschedules itself immediately. Futures executors are FIFO queues, so by putting itself at the back in the queue other work can make progress!
1 reply 0 retweets 2 likesShow this thread -
Replying to @soldair
Oh dang, you're entirely right! :D
4:09 PM - 9 Oct 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
