watchentered

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package watchentered tells a watch delivery that its listener went on to a wait the host knows.

Pi runs a listener's synchronous part, up to its first await, before the code that awaited a commit resumes. A Go listener is a blocking call: the delivery scheduler (chord.DeliveryScheduler.AwaitEntered) orders what runs before its first wait by having the waits of the host say so. The delivery registers its goroutine here; a wait that the host provides (the Session's Park, a gate or line wait, the host loop's park) calls Entered, which marks the delivery on the calling goroutine entered. The mapping is by goroutine ID, so a listener passes nothing, and reads no goroutine state beyond the caller's own ID.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entered

func Entered()

Entered marks the delivery the calling goroutine runs, if any, entered: it is about to wait for something the host knows.

func Register

func Register(delivery Delivery) (done func())

Register records that the calling goroutine runs delivery; the returned function ends it.

Types

type Delivery

type Delivery interface{ MarkEntered() }

Delivery is what a registered delivery gives: it marks itself entered.

func Current

func Current() (Delivery, bool)

Current is the delivery the calling goroutine runs, if any.

Jump to

Keyboard shortcuts

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