internal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpinLock

func SpinLock() sync.Locker

SpinLock creates a new spin-lock.

Types

type AsyncJobQueue

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

AsyncJobQueue queues pending tasks.

func NewAsyncJobQueue

func NewAsyncJobQueue() AsyncJobQueue

NewAsyncJobQueue creates a note-queue.

func (*AsyncJobQueue) ForEach

func (q *AsyncJobQueue) ForEach() (err error)

ForEach iterates this queue and executes each note with a given func.

func (*AsyncJobQueue) Push

func (q *AsyncJobQueue) Push(job Job)

Push pushes a item into queue.

type Job

type Job func() error

Job is a asynchronous function.

Jump to

Keyboard shortcuts

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