Yay, async-std just landed a patch to add an async version of ToSocketAddr!
This is useful because when using std's ToSocketAddr it may perform DNS lookups and block while resolving
.
This is now solved thanks to the excellent work of @janus_of_DC!https://github.com/async-rs/async-std/pull/74 …
-
Show this thread
-
Replying to @yoshuawuyts @janus_of_DC
I wonder what the performance characteristics are for using the async version over the original. I'm guessing it helps a lot on high latency networks
1 reply 0 retweets 1 like -
Replying to @NikolaiVazquez @janus_of_DC
It depends on the workload, but overall this should mostly take some variance away — def don't want to have a scenario where your server starts locking up because DNS resolution is blocking your threads.
1 reply 0 retweets 1 like -
Replying to @yoshuawuyts @janus_of_DC
Is there an underlying timeout that std uses to avoid locking up on this? The method already returns a Result
1 reply 0 retweets 0 likes
Replying to @NikolaiVazquez @janus_of_DC
Not sure; could very well be it relies directly on kernel behavior. You'll have to check the source I think.
11:53 PM - 4 Sep 2019
from Berlin, Germany
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.