diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-06-13 09:52:40 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-06-13 09:52:40 +0400 |
commit | b1413145f58be6c3d7e536574a19e1b6c333cd54 (patch) | |
tree | 2d2464533a4ec45d572d191c6439b84c73567a9c /src/Network/BitTorrent/Internal.hs | |
parent | 38d8eb046cefce18a6689488994c05abf1223ffe (diff) |
~ Use bounded chan to avoid space leaks.
Diffstat (limited to 'src/Network/BitTorrent/Internal.hs')
-rw-r--r-- | src/Network/BitTorrent/Internal.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/Internal.hs b/src/Network/BitTorrent/Internal.hs index afe1fff1..918bfed7 100644 --- a/src/Network/BitTorrent/Internal.hs +++ b/src/Network/BitTorrent/Internal.hs | |||
@@ -89,6 +89,9 @@ import Network.BitTorrent.Peer | |||
89 | import Network.BitTorrent.Exchange.Protocol as BT | 89 | import Network.BitTorrent.Exchange.Protocol as BT |
90 | import Network.BitTorrent.Tracker.Protocol as BT | 90 | import Network.BitTorrent.Tracker.Protocol as BT |
91 | 91 | ||
92 | {----------------------------------------------------------------------- | ||
93 | Progress | ||
94 | -----------------------------------------------------------------------} | ||
92 | 95 | ||
93 | -- | 'Progress' contains upload/download/left stats about | 96 | -- | 'Progress' contains upload/download/left stats about |
94 | -- current client state. | 97 | -- current client state. |
@@ -109,6 +112,7 @@ startProgress = Progress 0 0 | |||
109 | Client session | 112 | Client session |
110 | -----------------------------------------------------------------------} | 113 | -----------------------------------------------------------------------} |
111 | 114 | ||
115 | -- TODO comment thread count bounding | ||
112 | type ThreadCount = Int | 116 | type ThreadCount = Int |
113 | 117 | ||
114 | defaultThreadCount :: ThreadCount | 118 | defaultThreadCount :: ThreadCount |
@@ -169,6 +173,7 @@ newClient n exts = do | |||
169 | Swarm session | 173 | Swarm session |
170 | -----------------------------------------------------------------------} | 174 | -----------------------------------------------------------------------} |
171 | 175 | ||
176 | -- TODO document P2P sessions bounding | ||
172 | type SessionCount = Int | 177 | type SessionCount = Int |
173 | 178 | ||
174 | defSeederConns :: SessionCount | 179 | defSeederConns :: SessionCount |