I am able to use crates like timerfd, eventfd, inotify, or uds_windows without any modifications. 2/4 How to asyncify anything: 1. Initialize the I/O object with Async::new(). 2. Implement a non-blocking function like try_read() above. 3. Wrap it in read_with()/write_with().
-
-
Show this thread
-
Over the past few weeks I've been writing all kinds of async examples: HTTP clients/servers based on async-h1/hyper, chat server/client, signals, processes, files, timers, websockets, TLS, stdin/stdout, web crawlers, etc. 3/4
Show this thread -
Turning blocking APIs into async is easy - just tack an async adapter onto it and you're done. So here's a surprising discovery: the async ecosystem feels..... pretty mature to me?? What I'm really struggling with is the maturity of the old-fashioned blocking ecosystem. 4/4
Show this thread
End of conversation
New conversation -
-
-
So does this mean that the "sleep indefinitely on an FD" is the only interface provided by smol? Is there a way to schedule tasks with a timer that just directly uses the epoll timeout?
-
Yes, there are also regular timers implemented inside smol that you can use, just like in tokio and async-std.
End of conversation
New conversation -
-
-
The fact that we haven't settled on a defacto standard in areas such as error handling and async execution is one of my favorite things in Rust. It fosters healthy competition and the emerging solutions are better than the individual parts. Thanks!
-
In particular, I like that your approach is very explicit and there's no hidden magic from heavy use of macros and custom derives. This is in part due to huge improvements in the standard library of course, but it's great to see things coming together so nicely.
End of conversation
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.