async/await (1): 非同期計算の抽象化として,モジュール core::ops に次のトレイトが追加される(Future に似ているが Error が取り除かれている) trait Async { type Output; fn poll(self: Pin<Self>, cx: &mut task::Context) -> Poll<Self::Output>; }
-
Show this thread
-
・Pin<Self> は RFC 2349 で導入された Pin API(直感的に言うと制御付きの可変参照) ・task::Context はタスク(Executor により起動された非同期計算)に紐づいたコンテキスト依存な情報が格納される
1 reply 0 retweets 0 likesShow this thread -
Async を実装した型単体では機能せず,Executor によりタスク(軽量スレッド)として起動する。
1 reply 0 retweets 0 likesShow this thread -
Replying to @shitsyndrome
正確には違うかもしれないです(RFC全体を把握するために雑にメモってるだけなので…)
1:25 AM - 26 Apr 2018
0 replies
0 retweets
0 likes
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.