summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-07-28 05:12:03 -0400
committerjoe <joe@jerkface.net>2017-07-28 05:12:03 -0400
commit40d376e7a41267fd4e96eb95a5ad728429deeed5 (patch)
tree17dc815ec1ebd10cf94081cd8b07b984b2cbce4b /examples
parent7f7ede57388ed29e0fbaab9aac6b9211f67ee3e2 (diff)
Removed async-pool as dependency for dhtd executable.
Diffstat (limited to 'examples')
-rw-r--r--examples/dhtd.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index b63bd6fc..9bb7c5a7 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -53,7 +53,7 @@ import Network.DHT.Routing as R
53import Data.Aeson as J (ToJSON, FromJSON) 53import Data.Aeson as J (ToJSON, FromJSON)
54import qualified Data.Aeson as J 54import qualified Data.Aeson as J
55import qualified Data.ByteString.Lazy as L 55import qualified Data.ByteString.Lazy as L
56import Control.Concurrent.Async.Pool 56import Tasks
57import System.IO.Error 57import System.IO.Error
58import qualified Data.Serialize as S 58import qualified Data.Serialize as S
59import Network.BitTorrent.DHT.ContactInfo as Peers 59import Network.BitTorrent.DHT.ContactInfo as Peers
@@ -139,8 +139,9 @@ pingNodes netname DHT{dhtPing} = do
139 Right ns -> do fork $ do 139 Right ns -> do fork $ do
140 myThreadId >>= flip labelThread ("pinging."++fname) 140 myThreadId >>= flip labelThread ("pinging."++fname)
141 putStrLn $ "Forked "++show fname 141 putStrLn $ "Forked "++show fname
142 withTaskGroup 10 $ \g -> do 142 withTaskGroup ("withTaskGroup."++fname) 10 $ \g -> do
143 mapTasks_ g (map dhtPing ns) 143 mapM_ (\n -> forkTask g (show n) $ void $ dhtPing n)
144 (ns `asTypeOf` [])
144 putStrLn $ "Load finished "++show fname 145 putStrLn $ "Load finished "++show fname
145 return True 146 return True
146 147