syncthing/internal/protocol
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
..
.gitignore Move top level packages to internal. 2014-09-27 09:42:10 +02:00
common_test.go Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
counting.go Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
debug.go Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
deviceid_test.go Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
deviceid.go Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
doc.go Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
header.go Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
message_xdr.go Update xdr; handle marshalling errors 2014-10-21 09:20:14 +02:00
message.go Add job queue (fixes #629) 2015-01-02 15:33:39 +01:00
nativemodel_darwin.go Dependency update, new golang.org/x package names 2014-11-30 00:17:00 +01:00
nativemodel_unix.go Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
nativemodel_windows.go Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
protocol_test.go Use more inclusive copyright header 2014-11-17 12:54:42 +01:00
protocol.go Add symlink support at the protocol level 2014-11-20 16:32:00 +01:00
wireformat.go Dependency update, new golang.org/x package names 2014-11-30 00:17:00 +01:00