Created
July 28, 2010 18:36
-
-
Save seancron/495738 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def dns-cache (new Cache)) | |
(defn lookup-dns | |
"Does a DNS lookup with no cache" | |
[host] | |
(let [dnsLookup (new Lookup host)] | |
(. dns-cache clearCache) | |
(. dnsLookup setCache dns-cache) | |
(. dnsLookup run) | |
(. dnsLookup getResult))) | |
<snip> | |
(let [agents (for [host hosts] (agent host))] | |
(doseq [agent agents] | |
(send-off agent lookup-dns)) | |
(apply await agents) | |
(doseq [agent agents] | |
(println @agent))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment