multiexecutor

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package multiexecutor provides a structure MultiExecutor that can be used to guarantee exclusive by ID, in order execution of functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiExecutor

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

MultiExecutor - a struct that can be used to guarantee exclusive by ID, in order execution of functions.

func (*MultiExecutor) AsyncExec

func (e *MultiExecutor) AsyncExec(id string, f func()) (ch <-chan struct{})

AsyncExec - guarantees f() will be executed Exclusively for specified ID and in the Order submitted.

It immediately returns a channel that will be closed when f() has completed execution.

Jump to

Keyboard shortcuts

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