Commit fc6936d8 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

mv comment

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent fa38bee3
...@@ -10,6 +10,7 @@ import ( ...@@ -10,6 +10,7 @@ import (
// to help decide how to sort tasks (on add) and how to select // to help decide how to sort tasks (on add) and how to select
// tasks (on getnext). For now, we are assuming a dumb/nice strategy. // tasks (on getnext). For now, we are assuming a dumb/nice strategy.
type taskQueue struct { type taskQueue struct {
// TODO: make this into a priority queue
tasks []*task tasks []*task
taskmap map[string]*task taskmap map[string]*task
} }
...@@ -27,7 +28,6 @@ type task struct { ...@@ -27,7 +28,6 @@ type task struct {
} }
// Push currently adds a new task to the end of the list // Push currently adds a new task to the end of the list
// TODO: make this into a priority queue
func (tl *taskQueue) Push(block u.Key, priority int, to peer.Peer) { func (tl *taskQueue) Push(block u.Key, priority int, to peer.Peer) {
if task, ok := tl.taskmap[taskKey(to, block)]; ok { if task, ok := tl.taskmap[taskKey(to, block)]; ok {
// TODO: when priority queue is implemented, // TODO: when priority queue is implemented,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment