Skip to content
Snippets Groups Projects
Commit 991e4d01 authored by Josh Brooks's avatar Josh Brooks
Browse files

Make starting of FT's sender worker pool synchronous

parent 029e5313
No related branches found
No related tags found
3 merge requests!510Release,!381Initial CTIDH,!378Add a debug GetRunningProcesses to bindings
......@@ -215,14 +215,17 @@ func NewManager(params Params, user FtE2e) (FileTransfer, error) {
// StartProcesses starts the sending threads. Adheres to the xxdk.Service type.
func (m *manager) StartProcesses() (stoppable.Stoppable, error) {
// Construct stoppables
multiStoppable := stoppable.NewMulti(fileTransferStoppable)
senderPoolStop := stoppable.NewMulti(workerPoolStoppable)
batchBuilderStop := stoppable.NewSingle(batchBuilderThreadStoppable)
// Start sending threads
go m.startSendingWorkerPool(multiStoppable)
m.startSendingWorkerPool(senderPoolStop)
go m.batchBuilderThread(batchBuilderStop)
// Create a multi stoppable
multiStoppable := stoppable.NewMulti(fileTransferStoppable)
jww.DEBUG.Printf("Adding sender pool w/ name %s", senderPoolStop.Name())
multiStoppable.Add(senderPoolStop)
multiStoppable.Add(batchBuilderStop)
return multiStoppable, nil
......
......@@ -65,6 +65,8 @@ func (m *manager) startSendingWorkerPool(multiStop *stoppable.Multi) {
go m.sendingThread(stop)
multiStop.Add(stop)
}
jww.DEBUG.Printf("startSendingWorkerPool multi after adding all: %v", multiStop)
}
// sendingThread sends part packets that become available oin the send queue.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment