(少なくともカレントスレッドが)ブロックしない Future を作ろうと思ったら oneshot::spawn(poll_fn(|| { blocking(|| { // ブロックするコード }) ), &mut exec) と書くと良いのか(execはブロックするFutureを実行するためのExecutor)
-
Show this thread
-
Replying to @ubnt_intrepid
AsyncWrite 実装してるじゃんと思って喜び勇んで poll_read 読んだらカレントスレッドがブロックするの、いまいち納得いかないんですが、そういうもんですかね……
1 reply 0 retweets 0 likes
Replying to @KOBA789
blocking()側はしょうがないとして、Stdin側の実装は確かにカレントスレッドをブロックさせないことを前提としてくれても良さそうですね…
12:21 PM - 16 Jun 2018
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.