Documentation ¶
Overview ¶
Package priority_queue implement a thread safe priority powered by "container/heap"
Index ¶
- Constants
- type PQueue
- func (pq *PQueue) Cap() int
- func (pq *PQueue) IsEmpty() bool
- func (pq *PQueue) IsFull() bool
- func (pq PQueue) Len() int
- func (pq *PQueue) Length() int
- func (pq PQueue) Less(i, j int) bool
- func (pq *PQueue) Pop() interface{}
- func (pq *PQueue) PopItem() (interface{}, bool)
- func (pq *PQueue) Push(v interface{})
- func (pq *PQueue) PushItem(v *Payload) (evicted bool)
- func (pq PQueue) Swap(i, j int)
- type Payload
Constants ¶
View Source
const (
Default_PQueue_Size = 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PQueue ¶
type PQueue struct {
// contains filtered or unexported fields
}
PQueue implement a priority queue
func (PQueue) Len ¶
below is used to implement internal interface ref:https://godoc.org/container/heap shall not use it directly
Click to show internal directories.
Click to hide internal directories.