sync

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package sync provides bindings for Go's sync package and concurrency primitives.

Index

Constants

This section is empty.

Variables

View Source
var Types []byte

Functions

func BindMutex

func BindMutex(vm *sobek.Runtime, mu *sync.RWMutex, el *eventloop.EventLoop) sobek.Value

func Register

func Register(vm *sobek.Runtime, el *eventloop.EventLoop)

Types

type AsyncMutex

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

AsyncMutex wraps a sync.RWMutex with async-friendly locking operations.

func NewAsyncMutex

func NewAsyncMutex(mu *sync.RWMutex, el *eventloop.EventLoop) *AsyncMutex

func (*AsyncMutex) Lock

func (m *AsyncMutex) Lock(vm *sobek.Runtime) sobek.Value

func (*AsyncMutex) RLock

func (m *AsyncMutex) RLock(vm *sobek.Runtime) sobek.Value

func (*AsyncMutex) RUnlock

func (m *AsyncMutex) RUnlock()

func (*AsyncMutex) Unlock

func (m *AsyncMutex) Unlock()

type Module

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

func (*Module) Sleep

func (m *Module) Sleep(call sobek.FunctionCall) sobek.Value

func (*Module) Spawn

func (m *Module) Spawn(call sobek.FunctionCall) sobek.Value

Jump to

Keyboard shortcuts

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