syncthing/internal
Audrius Butkevicius fd0a147ae6 Add job queue (fixes #629)
Request to terminate currently ongoing downloads and jump to the bumped file
incoming in 3, 2, 1.

Also, has a slightly strange effect where we pop a job off the queue, but
the copyChannel is still busy and blocks, though it gets moved to the
progress slice in the jobqueue, and looks like it's in progress which it isn't
as it's waiting to be picked up from the copyChan.

As a result, the progress emitter doesn't register on the task, and hence the file
doesn't have a progress bar, but cannot be replaced by a bump.

I guess I can fix progress bar issue by moving the progressEmiter.Register just
before passing the file to the copyChan, but then we are back to the initial
problem of a file with a progress bar, but no progress happening as it's stuck
 on write to copyChan

I checked if there is a way to check for channel writeability (before popping)
but got struck by lightning just for bringing the idea up in #go-nuts.

My ideal scenario would be to check if copyChan is writeable, pop job from the
queue and shove it down handleFile. This way jobs would stay in the queue while
they cannot be handled, meaning that the `Bump` could bring your file up higher.
2015-01-02 15:33:39 +01:00
..
auto Add job queue (fixes #629) 2015-01-02 15:33:39 +01:00
beacon Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
config Generate a random API key on initial setup (fixes #1118) 2014-12-29 13:48:26 +01:00
discover Use Go 1.4 'generate' to create XDR codec 2014-12-06 14:23:10 +01:00
events Various style fixes 2014-12-08 16:36:15 +01:00
files Fix tests with newer goleveldb 2014-12-29 14:50:24 +01:00
fnmatch Escape plus sign (fixes #1090) 2014-12-07 00:10:32 +00:00
ignore Refactor ignore handling (...) 2014-12-23 10:46:02 +01:00
lamport Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
luhn Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
model Add job queue (fixes #629) 2015-01-02 15:33:39 +01:00
osutil Revisit -no-console option for Windows 2014-12-04 21:59:40 +00:00
protocol Add job queue (fixes #629) 2015-01-02 15:33:39 +01:00
scanner Also check file size when determining if file is unchanged (fixes #1058) 2014-12-29 14:24:12 +01:00
stats Display last received file and time (fixes #292, fixes #801) 2014-12-09 20:24:48 +00:00
symlinks Scrap IsSymlink for native support on Go 1.4 2014-12-04 23:02:57 +00:00
upgrade Make auto upgrade careful about breaking changes (fixes #1047) 2014-12-29 12:35:06 +01:00
upnp Use ListenMulticastUDP for multicast sockets (potentially fixes #1113) 2014-12-30 22:27:47 +00:00
versioner Silence versioner warnings for unmatched files (fixes #1117) 2014-12-30 22:43:07 +00:00