runqueue

package
v0.0.0-...-aeec266 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunQueue

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

RunQueue represents a lock-free operation queue.

func New

func New(name string) *RunQueue

New returns an initialized lock-free operation queue.

func (*RunQueue) Run

func (m *RunQueue) Run(fn func())

Run pushes a new operation function into the queue.

func (*RunQueue) Stop

func (m *RunQueue) Stop(stopCb func())

Stop signals the queue to stop running.

Callback function represented by 'stopCb' its guaranteed to be immediately executed only if no job has been previously scheduled.

Directories

Path Synopsis
Package mpsc provides an efficient implementation of a multi-producer, single-consumer lock-free queue.
Package mpsc provides an efficient implementation of a multi-producer, single-consumer lock-free queue.

Jump to

Keyboard shortcuts

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