synch

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package synch provides synchronization primitives.

This file defines a distributed Lock interface for acquiring and releasing locks with context support and timeouts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

func Runner

func Runner(repeat int, fn any) *Executor

func (*Executor) Run

func (o *Executor) Run(argv ...reflect.Value) []reflect.Value

type Lock

type Lock interface {
	Lock(ctx context.Context, source, owner string, timeout time.Duration) (bool, error)
	Unlock(ctx context.Context, source, owner string) (bool, error)
}

Jump to

Keyboard shortcuts

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