-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Extracted from #25592.
The default version of std.Io.net.HostName.lookup should first try the concurrent version, but upon receiving error.ConcurrencyUnavailable falls back to a non-concurrent version.
The non-concurrent version should sort results according to a tasteful subset of RFC 3484/6724 (Destination Address Selection).
Likewise, there should additionally be a non-concurrent version of std.Io.net.HostName.connect which tries results in order, stopping upon first success. This will prevent serial code from pessimizing the concurrent version by attempting more than one connection after already receiving success. Again, default version should try concurrently first, falling back to serial version.
Both concurrent and non-concurrent versions should also be independently callable.