Commit Graph

19 Commits

Author SHA1 Message Date
Matt Joiner 623d9e0e06 Rework requesting of shuffled pending pieces 2016-02-07 21:58:48 +11:00
Matt Joiner 1b8bc1498c Use missinggo.bitmap for tracking dirty chunks 2016-02-05 15:45:32 +11:00
Matt Joiner 63c73e18b3 Add File.Cancel 2016-02-05 01:18:54 +11:00
Matt Joiner 430f26f726 Recalculate all piece priorities more efficiently 2016-02-01 22:06:13 +11:00
Matt Joiner afa264e6c5 Reintroduce connection piece inclinations, and begin caching piece priorities 2016-02-01 21:11:41 +11:00
Matt Joiner ae9bba2611 Fix downloading of unwanted chunks, and write out downloaded chunks using the connection loop goroutine
Doing the writes with the connection loop goroutine prevents memory use blowing out when chunks aren't written out quickly enough.
2016-01-28 05:54:48 +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 2beb5f8bd4 Track dirty chunks, instead of pending chunk specs
This is the first step toward having purely Reader-based priorities. If a chunk is pending, that currently implies that we want to download it. I want to move that kind of state out to the readers.
2016-01-13 17:11:59 +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 eebd09c0fe Allow subscribing to torrent piece state changes 2015-09-06 12:33:22 +10: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 7e9fe4f447 Store chunk data without holding client lock 2015-07-15 16:00:59 +10:00
Matt Joiner c018c660f0 Allow chunk size to be specified per torrent 2015-07-15 15:31:18 +10:00
Matt Joiner ced5733c88 Improve uploading/seeding 2015-06-16 16:57:47 +10:00
Matt Joiner 21fb4933fc Change the way piece state is exposed to give more detail 2015-06-01 18:22:12 +10:00
Matt Joiner bc4aa06c91 Comments 2015-06-01 18:17:14 +10:00
Matt Joiner 1cf591dc3d Switch to using a slice for tracking pending chunks. Saves massive amounts of memory. 2015-05-16 10:51:48 +10:00
Matt Joiner 6c48d59adb Move piece into its own file 2015-04-08 02:14:35 +10:00