zsync

package
v1.7.12 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateError added in v1.7.12

type AggregateError struct {
	Errors []error
}

func (*AggregateError) Error added in v1.7.12

func (ae *AggregateError) Error() string

type Promise added in v1.7.12

type Promise[T any] struct {
	// contains filtered or unexported fields
}

func NewPromise added in v1.7.12

func NewPromise[T any](executor func() (T, error)) *Promise[T]

func NewPromiseContext added in v1.7.12

func NewPromiseContext[T any](ctx context.Context, executor func() (T, error)) *Promise[T]

func PromiseAll added in v1.7.12

func PromiseAll[T any](promises ...*Promise[T]) *Promise[[]T]

func PromiseAllContext added in v1.7.12

func PromiseAllContext[T any](ctx context.Context, promises ...*Promise[T]) *Promise[[]T]

func PromiseAny added in v1.7.12

func PromiseAny[T any](promises ...*Promise[T]) *Promise[T]

func PromiseAnyContext added in v1.7.12

func PromiseAnyContext[T any](ctx context.Context, promises ...*Promise[T]) *Promise[T]

func PromiseRace added in v1.7.12

func PromiseRace[T any](promises ...*Promise[T]) *Promise[T]

func PromiseRaceContext added in v1.7.12

func PromiseRaceContext[T any](ctx context.Context, promises ...*Promise[T]) *Promise[T]

func (*Promise[T]) Catch added in v1.7.12

func (p *Promise[T]) Catch(rejected func(error) (T, error)) *Promise[T]

func (*Promise[T]) Done added in v1.7.12

func (p *Promise[T]) Done() (value T, reason error)

func (*Promise[T]) Finally added in v1.7.12

func (p *Promise[T]) Finally(finally func()) *Promise[T]

func (*Promise[T]) Then added in v1.7.12

func (p *Promise[T]) Then(fulfilled func(T) (T, error), rejected ...func(error) (T, error)) *Promise[T]

type PromiseState added in v1.7.12

type PromiseState uint8

type RBMutex

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

RBMutex is a reader biased reader/writer mutual exclusion lock

func NewRBMutex

func NewRBMutex() *RBMutex

NewRBMutex creates a new RBMutex instance

func (*RBMutex) Lock

func (mu *RBMutex) Lock()

func (*RBMutex) RLock

func (mu *RBMutex) RLock() *RToken

func (*RBMutex) RUnlock

func (mu *RBMutex) RUnlock(t *RToken)

func (*RBMutex) Unlock

func (mu *RBMutex) Unlock()

type RToken

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

type WaitGroup

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

func (*WaitGroup) Add added in v1.7.3

func (h *WaitGroup) Add(delta int)

func (*WaitGroup) Done added in v1.7.3

func (h *WaitGroup) Done()

func (*WaitGroup) Go

func (h *WaitGroup) Go(f func())

func (*WaitGroup) GoTry

func (h *WaitGroup) GoTry(f func())

func (*WaitGroup) Wait

func (h *WaitGroup) Wait() error

Jump to

Keyboard shortcuts

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