Open coot opened 12 months ago
dnsext
, a fork of dns
, provides the same semantics with an STM magic:
https://github.com/kazu-yamamoto/dnsext/blob/586f42031459fdfc3e753352755d4f7af79ac1d6/dnsext-do53/DNS/Do53/Resolve.hs#L84
If you wish, I can bring it to dns
.
We noticed the difference between concurrent & sequential semantics. When
resolvConcurrent
is not set,resolveSequential
will loop over errors and will try to return the first non error result, but ifresolveConcurrent
is setresolveConcurrent
will run all queries in parallel doingfirst-to-finish
synchronisation. The difference is that if the first value is an errorresolveConcurrent
will return the error unlikeresolveSequential
.