Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PriorityQueue ¶
type PriorityQueue struct {
// contains filtered or unexported fields
}
PriorityQueue is the basic structure
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(ctx context.Context, x interface{}, p int) error
Push pushes an item to the appropriate queue specified in the priority argument if context is given it waits until either the item is pushed or the Context aborts otherwise returns errContention if the queue is full
func (*PriorityQueue) Run ¶
func (pq *PriorityQueue) Run(ctx context.Context, f func(interface{}))
Run is a forever loop popping items from the queues
Click to show internal directories.
Click to hide internal directories.