atomic

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicDo

func AtomicDo[T any](actor *Actor, owner *T, f func(*T))

AtomicDo executes f with actor-style serialization.

func AtomicDoWithInit

func AtomicDoWithInit[T any](actor *Actor, owner *T, f func(*T), initHook func())

AtomicDoWithInit executes f with actor-style serialization and runs initHook once.

Types

type Actor

type Actor = core.AtomicActor

Actor provides actor-style serialized execution for any struct.

func NewActor

func NewActor(group *Group) *Actor

NewActor creates a new Actor bound to the provided group. If group is nil, DefaultGroup is used.

type Group

type Group = core.AtomicGroup

Group defines a reentrancy scope for AtomicDo.

func DefaultGroup

func DefaultGroup() *Group

DefaultGroup returns the package-wide default group.

func NewGroup

func NewGroup() *Group

NewGroup creates a new Group.

Jump to

Keyboard shortcuts

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