myqueue

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestChannelQueueFivePush

func TestChannelQueueFivePush(t *testing.T)

func TestChannelQueueMultipleFivePush

func TestChannelQueueMultipleFivePush(t *testing.T)

func TestChannelQueueNoPush

func TestChannelQueueNoPush(t *testing.T)

func TestChannelQueueOnePush

func TestChannelQueueOnePush(t *testing.T)

func TestChannelQueueRecursiveStop

func TestChannelQueueRecursiveStop(t *testing.T)

Types

type ChannelQueue

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

func (*ChannelQueue) NotifyWaitAdded

func (cq *ChannelQueue) NotifyWaitAdded(fn func(q MyQueue))

func (*ChannelQueue) NotifyWaitDone

func (cq *ChannelQueue) NotifyWaitDone(fn func(q MyQueue))

func (*ChannelQueue) Push

func (cq *ChannelQueue) Push(item interface{})

func (*ChannelQueue) Stop

func (cq *ChannelQueue) Stop()

func (*ChannelQueue) Wait

func (cq *ChannelQueue) Wait(fn func(a interface{}))

type MyQueue

type MyQueue interface {
	NotifyWaitAdded(fn func(q MyQueue))
	NotifyWaitDone(fn func(q MyQueue))
	Wait(fn func(a interface{}))
	Stop()
	Push(a interface{})
}

func MakeChannelQueue

func MakeChannelQueue(qbufferSize ...int) MyQueue

Jump to

Keyboard shortcuts

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