3 ms·
You had a call to read(). Now you have a thread, an event loop, a pooling mechanism, and a synchronization with the thread. That's much more system calls and cp
by fooyc 10y ago
You had a call to read(). Now you have a thread, an event loop, a pooling mechanism, and a synchronization with the thread. That's much more system calls and cpu cycles.
- eridius 10y agoIf you're just talking about a call to read(), that would be modeled by a Future, not a tokio reactor.
- fooyc 10y agoCan you explain how you can make a blocking call to an async function without overhead ?
- eridius 10y agoIf you accept that using the async call in an asynchronous nature doesn't have overhead, then you can turn it into a synchronous call by saying something like `.wait()`.
- fooyc 10y ago> If you accept that using the async call in an asynchronous nature doesn't have overhead Obviously that's not the case. There is a lot of overhead.