waits

package
v0.0.0-...-a532a67 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetScopeWaitManager

func GetScopeWaitManager(scp app.DataScope, name string) (value commservices.ScopeWaitManager, err error)

GetScopeWaitManager get ScopeWaitManager value from data scope

func NewScopeWaitManager

func NewScopeWaitManager(ctxScope app.Scope) commservices.ScopeWaitManager

NewScopeWaitManager create new ScopeWaitManager instance

func WaitManagerFactory

func WaitManagerFactory(dp app.DependencyProvider) (ri interface{}, err error)

WaitManagerFactory create new WaitManager instance

Types

type ScopeWaitManager

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

ScopeWaitManager is wait group manager

func (*ScopeWaitManager) Add

func (manager *ScopeWaitManager) Add(name string, delta int)

Add task counter to waitgroup

func (*ScopeWaitManager) Done

func (manager *ScopeWaitManager) Done(name string)

Done decrements the WaitGroup counter by one.

func (*ScopeWaitManager) Wait

func (manager *ScopeWaitManager) Wait(name string)

Wait blocks until the WaitGroup counter is zero.

type WaitManager

type WaitManager struct{}

WaitManager is namespace storage for scope

func NewWaitManager

func NewWaitManager() WaitManager

NewWaitManager create new WaitManager instance

func (WaitManager) ForScope

func (manager WaitManager) ForScope(ctxScope app.Scope) (swm commservices.ScopeWaitManager, err error)

ForScope return scope manager

Jump to

Keyboard shortcuts

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