diff options
-rw-r--r-- | bittorrent.cabal | 1 | ||||
-rw-r--r-- | examples/dhtd.hs | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/bittorrent.cabal b/bittorrent.cabal index 5f5af8c7..a22f6550 100644 --- a/bittorrent.cabal +++ b/bittorrent.cabal | |||
@@ -334,7 +334,6 @@ executable dhtd | |||
334 | default-language: Haskell2010 | 334 | default-language: Haskell2010 |
335 | build-depends: base, network, bytestring, hashable, deepseq | 335 | build-depends: base, network, bytestring, hashable, deepseq |
336 | , aeson | 336 | , aeson |
337 | , async-pool | ||
338 | , pretty | 337 | , pretty |
339 | , bittorrent | 338 | , bittorrent |
340 | , unix | 339 | , unix |
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 | |||
53 | import Data.Aeson as J (ToJSON, FromJSON) | 53 | import Data.Aeson as J (ToJSON, FromJSON) |
54 | import qualified Data.Aeson as J | 54 | import qualified Data.Aeson as J |
55 | import qualified Data.ByteString.Lazy as L | 55 | import qualified Data.ByteString.Lazy as L |
56 | import Control.Concurrent.Async.Pool | 56 | import Tasks |
57 | import System.IO.Error | 57 | import System.IO.Error |
58 | import qualified Data.Serialize as S | 58 | import qualified Data.Serialize as S |
59 | import Network.BitTorrent.DHT.ContactInfo as Peers | 59 | import 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 | ||