handleryield

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package handleryield carries, through an extension event's dispatch context, the call a host makes when a handler stops running synchronously.

Pi runs every extension on the process's one event loop. While a handler and the promise continuations it settles at once are running, nothing else in the process runs: a child process that exited, a provider response that arrived and a timer all wait until the handler awaits a timer or I/O and the loop turns. A host that runs a handler elsewhere reports that turn with Report, so its caller can let other work proceed at the same point.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Report

func Report(ctx context.Context)

Report calls the yield ctx carries, if any.

func With

func With(ctx context.Context, yield func()) context.Context

With returns ctx carrying yield. A host calls it, possibly more than once and from any goroutine, when a handler dispatched with the returned context is no longer running synchronously.

Types

This section is empty.

Jump to

Keyboard shortcuts

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