Both async-std and tokio are reimplementing the whole std::fs in an async manner. But can we invent some kind of async adapter for std::fs instead of replacing it entirely? 3/13
-
-
I forgot to mention: The blocking!() macro already exists and was first introduced in Bastion and it's really nice! https://docs.rs/bastion/0.3.5-alpha/bastion/macro.blocking.html …pic.twitter.com/rQjdrwX2ZZ
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Wait- if we're spawning blocking i/o operations into a thread pool, doesn't that defeat the purpose of using async i/o in the first place? We already have techniques for doing stuff in a thread pool; I had understood that context switching becomes an issue.
-
Networking can be done truly asynchronously using epoll/kqueue/WSAPoll. However, OSs don't handle async files and some other things as well. In those cases there isn't a better solution than offloading blocking operations onto a threadpool. Other runtimes like Go's do the same.
- 1 more reply
New conversation -
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.