asyncrc

package
v0.0.0-...-32c7374 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Future

type Future[T any] interface {
	async.Future[T]

	// Retain increments the reference count, panics if the future is already released.
	Retain()

	// Release decrements the reference count, frees the future if it reaches zero.
	Release()
}

Future is a reference counted future.

type Promise

type Promise[T any] interface {
	async.Promise[T]

	// Refcount returns the current reference count.
	Refcount() int64

	// Retain increments the reference count, panics if the promise is already released.
	Retain()

	// Release decrements the reference count, frees the future if it reaches zero.
	Release()
}

Promise is a reference counted promise.

func NewPromise

func NewPromise[T any]() Promise[T]

NewPromise returns a pending reference counted promise.

Jump to

Keyboard shortcuts

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