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 ¶
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
NewAsyncMutex creates an AsyncMutex wrapping the given RWMutex.
func (*AsyncMutex) Lock ¶
func (m *AsyncMutex) Lock(vm *goja.Runtime) goja.Value
Lock acquires an exclusive write lock asynchronously.
func (*AsyncMutex) RLock ¶
func (m *AsyncMutex) RLock(vm *goja.Runtime) goja.Value
RLock acquires a shared read lock asynchronously.
func (*AsyncMutex) RUnlock ¶
func (m *AsyncMutex) RUnlock()
RUnlock releases a previously acquired read lock.
func (*AsyncMutex) Unlock ¶
func (m *AsyncMutex) Unlock()
Unlock releases a previously acquired write lock.
Click to show internal directories.
Click to hide internal directories.