summaryrefslogtreecommitdiffhomepage
path: root/Network/DNS/Resolver.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Network/DNS/Resolver.hs')
-rw-r--r--Network/DNS/Resolver.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Network/DNS/Resolver.hs b/Network/DNS/Resolver.hs
index e959bcb..54a6411 100644
--- a/Network/DNS/Resolver.hs
+++ b/Network/DNS/Resolver.hs
@@ -78,6 +78,11 @@ makeAddrInfo addr = do
----------------------------------------------------------------
+{-|
+ Giving a thread-safe 'Resolver' to the function of the second
+ argument. 'withResolver' should be passed to 'forkIO'.
+-}
+
withResolver :: ResolvSeed -> (Resolver -> IO ()) -> IO ()
withResolver seed func = do
let ai = addrInfo seed