priorityqueue

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PriorityMsgQueue

type PriorityMsgQueue struct {
	// contains filtered or unexported fields
}

PriorityMsgQueue is a priority message queue

func New

func New(n int, l int) *PriorityMsgQueue

New return a new PriorityMsgQueue

func (*PriorityMsgQueue) Close added in v0.3.0

func (pq *PriorityMsgQueue) Close()

Close close the queue

func (*PriorityMsgQueue) Push

func (pq *PriorityMsgQueue) Push(item interface{}, p int) error

Push pushes an item to the queue specified in the priority argument and notify the loop

func (*PriorityMsgQueue) Run

func (pq *PriorityMsgQueue) Run(proc goprocess.Process, f func(interface{}))

Run is a loop popping items from the priority message queues

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL