serial

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package serial is the one operation queue of the SQLite database adapters: operations run in call order and a transaction holds the queue until it settles (Pi's SerialQueue and the promise chain of NodeSqliteDatabase).

Index

Constants

This section is empty.

Variables

View Source
var ErrTransactionInactive = errors.New("SQLite transaction handle is no longer active")

ErrTransactionInactive is returned by a transaction handle used after its callback returned.

Functions

This section is empty.

Types

type Queue

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

Queue runs operations in call order. An operation starts immediately when nothing is running or waiting; otherwise it waits for everything before it.

func NewQueue

func NewQueue() *Queue

NewQueue returns an idle queue.

func (*Queue) Acquire

func (queue *Queue) Acquire() (release func())

Acquire takes the next turn and blocks until every earlier turn has been released.

func (*Queue) Queued

func (queue *Queue) Queued() int

Queued reports how many turns wait behind the running one.

Jump to

Keyboard shortcuts

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