2
0
mirror of synced 2025-02-24 14:48:27 +00:00

67 Commits

Author SHA1 Message Date
Matt Joiner
9e50da4892 Fix stall if data goes missing during a read 2016-01-28 13:21:50 +11:00
Matt Joiner
90348f6a48 Add pending write helpers 2016-01-25 07:22:33 +11:00
Matt Joiner
06445f2a1e It's working and the tests are usually passing
I still need to handle "prefetch"-style downloading, and some functions haven't been committed to force this issue.
2016-01-18 18:35:14 +11:00
Matt Joiner
89a6a20af6 Finally make Torrent.torrent private
A lot of code was using unintentionally exported stuff from the embedded *torrent in Torrent.
2016-01-17 00:14:15 +11:00
Matt Joiner
153c13db43 Revert "Merge pull request #54 from zhulik/master"
This reverts commit 5cf75b869c469196a8473c4962b99a450daaeeec, reversing
changes made to 09050ff2c5607f3991e6ec6422ed57ba0dee0bad.
2016-01-06 12:19:49 +11:00
Gleb Sinyavsky
48c3df2d43 Refactorings 2016-01-05 11:48:16 +03:00
Matt Joiner
bc5d79e1d3 Make torrent.Reader reads fail when the torrent is closed instead of stalling 2015-11-06 00:40:47 +11:00
Matt Joiner
d01c6221e6 Remove sync.Cond from piece
It's not trivial to ensure that anyone waiting on the piece Cond will wake on events like the torrent being dropped from the client.
2015-11-06 00:40:16 +11:00
Matt Joiner
b3a8020401 Store pieces inplace in torrent.Pieces
This should save some allocation overhead, especially for torrents that have 20k+ pieces.
2015-10-16 22:10:03 +11:00
Matt Joiner
085be622a0 Replacing pendingWrites WaitGroup with Mutex/Cond/int
Apparently I've been using WaitGroups wrong all along.
2015-08-05 02:40:46 +10:00
Matt Joiner
4d3b6e5116 Hold client lock as little as possible in Reader.readAt 2015-07-17 20:59:26 +10:00
Matt Joiner
7e9fe4f447 Store chunk data without holding client lock 2015-07-15 16:00:59 +10:00
Matt Joiner
4e80d48692 Add fixes triggered by TestResponsive 2015-07-15 15:54:19 +10:00
Matt Joiner
0ecd03db32 Retry Reader reads when data is unexpectedly missing 2015-06-03 13:36:27 +10:00
Matt Joiner
7e8ee950bc Docs and comments 2015-06-03 13:30:55 +10:00
Matt Joiner
0ec0302d1c Publicly expose Torrent.GotInfo 2015-04-28 15:24:17 +10:00
Matt Joiner
28b299e7c8 Rework the Torrent Reader interface, to allow reader options, and add "responsive" as one such option
Had several weeks of testing. Removes a lot of the "helper" reading methods, but this was necessary to allow per-Torrent reading options.
2015-04-14 23:59:41 +10:00