Documentation
¶
Index ¶
- Constants
- Variables
- func MaxParallelism() int
- type ParallelQ
- func (q ParallelQ) BlockUntilNoPending()
- func (q ParallelQ) Dequeue() (PriorityScorer, PriorityQ)
- func (q ParallelQ) Enqueue(priority PriorityScorer) PriorityQ
- func (q ParallelQ) IsEmpty() bool
- func (q ParallelQ) Length() int
- func (q ParallelQ) Meld(otherQ PriorityQ) PriorityQ
- func (q ParallelQ) Peek() PriorityScorer
- type PriorityQ
- type PriorityScorer
- type SynchronousQ
- func (s SynchronousQ) Dequeue() (PriorityScorer, PriorityQ)
- func (b SynchronousQ) DequeueWithMergeCallback(mergeCallback func([]node, ...*skewBinomial) skewBinomial) (PriorityScorer, bootstrappedSkewBinomial)
- func (s SynchronousQ) Enqueue(priority PriorityScorer) PriorityQ
- func (b SynchronousQ) IsEmpty() bool
- func (b SynchronousQ) Length() int
- func (s SynchronousQ) Meld(otherQ PriorityQ) PriorityQ
- func (b SynchronousQ) Peek() PriorityScorer
- func (b SynchronousQ) Score() int64
- func (b SynchronousQ) String() string
- type ThreadSafeList
- func (t ThreadSafeList) Count() int
- func (t *ThreadSafeList) DeleteObject(object unsafe.Pointer) (success bool)
- func (t *ThreadSafeList) InsertObject(object unsafe.Pointer, lessThanFn func(unsafe.Pointer, unsafe.Pointer) bool)
- func (t ThreadSafeList) Iter() <-chan unsafe.Pointer
- func (t ThreadSafeList) LengthGreaterThan(n int) bool
- func (t ThreadSafeList) Peek() unsafe.Pointer
- func (t *ThreadSafeList) PopFirst(failAddress unsafe.Pointer) unsafe.Pointer
- func (t *ThreadSafeList) PopHead() unsafe.Pointer
- func (t ThreadSafeList) PopNth(n int, failAddress unsafe.Pointer) unsafe.Pointer
- type TrySplitParameter
Constants ¶
View Source
const MELD_PERIOD = 2
View Source
const PARALLELISM_COEFF = 2
this number is based off of simple tuning experimentation
Variables ¶
View Source
var NULL_OBJECT = nullObject{}
Functions ¶
func MaxParallelism ¶
func MaxParallelism() int
Types ¶
type ParallelQ ¶ added in v1.0.0
type ParallelQ struct {
// contains filtered or unexported fields
}
func (ParallelQ) BlockUntilNoPending ¶ added in v1.0.0
func (q ParallelQ) BlockUntilNoPending()
func (ParallelQ) Dequeue ¶ added in v1.0.0
func (q ParallelQ) Dequeue() (PriorityScorer, PriorityQ)
func (ParallelQ) Enqueue ¶ added in v1.0.0
func (q ParallelQ) Enqueue(priority PriorityScorer) PriorityQ
func (ParallelQ) Peek ¶ added in v1.0.0
func (q ParallelQ) Peek() PriorityScorer
type PriorityQ ¶ added in v1.0.0
type PriorityQ interface {
Enqueue(priority PriorityScorer) PriorityQ
Peek() PriorityScorer
Meld(otherQ PriorityQ) PriorityQ
Dequeue() (PriorityScorer, PriorityQ)
Length() int
IsEmpty() bool
}
func NewImmutableSynchronousQ ¶ added in v1.0.0
func NewImmutableSynchronousQ() PriorityQ
func NewMutableParallelQ ¶ added in v1.0.0
func NewMutableParallelQ() PriorityQ
type PriorityScorer ¶ added in v1.0.0
type PriorityScorer interface {
Score() int64
}
type SynchronousQ ¶ added in v1.0.0
type SynchronousQ struct {
// contains filtered or unexported fields
}
func (SynchronousQ) Dequeue ¶ added in v1.0.0
func (s SynchronousQ) Dequeue() (PriorityScorer, PriorityQ)
func (SynchronousQ) DequeueWithMergeCallback ¶ added in v1.0.0
func (b SynchronousQ) DequeueWithMergeCallback(mergeCallback func([]node, ...*skewBinomial) skewBinomial) (PriorityScorer, bootstrappedSkewBinomial)
func (SynchronousQ) Enqueue ¶ added in v1.0.0
func (s SynchronousQ) Enqueue(priority PriorityScorer) PriorityQ
func (SynchronousQ) Meld ¶ added in v1.0.0
func (s SynchronousQ) Meld(otherQ PriorityQ) PriorityQ
func (SynchronousQ) Peek ¶ added in v1.0.0
func (b SynchronousQ) Peek() PriorityScorer
type ThreadSafeList ¶
type ThreadSafeList struct {
// contains filtered or unexported fields
}
func NewThreadSafeList ¶
func NewThreadSafeList() ThreadSafeList
func (ThreadSafeList) Count ¶
func (t ThreadSafeList) Count() int
func (*ThreadSafeList) DeleteObject ¶
func (t *ThreadSafeList) DeleteObject(object unsafe.Pointer) (success bool)
func (*ThreadSafeList) InsertObject ¶
func (ThreadSafeList) Iter ¶
func (t ThreadSafeList) Iter() <-chan unsafe.Pointer
func (ThreadSafeList) LengthGreaterThan ¶
func (t ThreadSafeList) LengthGreaterThan(n int) bool
func (ThreadSafeList) Peek ¶
func (t ThreadSafeList) Peek() unsafe.Pointer
func (*ThreadSafeList) PopFirst ¶
func (t *ThreadSafeList) PopFirst(failAddress unsafe.Pointer) unsafe.Pointer
func (*ThreadSafeList) PopHead ¶
func (t *ThreadSafeList) PopHead() unsafe.Pointer
type TrySplitParameter ¶
type TrySplitParameter struct {
N int
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.