func (w *worker) managedKillUploading() {
	w.mu.Lock()
	w.uploadTerminated = true
	w.mu.Unlock()
	w.managedDropUploadChunks()
}
managedKillUploading will disable all uploading for the worker.
package renter
import (
	"time"
	"github.com/NebulousLabs/Sia/build"
)
func (w *worker) managedDropChunk(uc *unfinishedUploadChunk) {
	uc.mu.Lock()
	uc.workersRemaining--
	uc.mu.Unlock()
	w.renter.managedCleanUpUploadChunk(uc)
}
func (w *worker) managedDropUploadChunks() {
	var chunksToDrop []*unfinishedUploadChunk
	w.mu.Lock()
	for i := 0; i < len(w.unprocessedChunks); i++ {
		chunksToDrop = append(chunksToDrop, w.unprocessedChunks[i])
	}
	w.unprocessedChunks = w.unprocessedChunks[:0]
	w.mu.Unlock()
	for i := 0; i < len(chunksToDrop); i++ {
		w.managedDropChunk(chunksToDrop[i])
	}
}