Documentation
¶
Overview ¶
Package timeline is a monotonic synchronisation timeline: work is numbered 1, 2, 3, ... as it is submitted, and completing number n completes every number up to n. It is the fence model of virtio-gpu (virtio specification, device-types/gpu/description.tex: with a ring index, "fence_id acts as a sequence number on the synchronization timeline", and when it completes "the device MUST send a response for all outstanding commands with a sequence number less than or equal to fence_id"), and of WebGPU's queue (onSubmittedWorkDone resolves once all work submitted so far is done).
It has no dependency and no notion of a GPU: one implementation for any producer that numbers submissions and learns of completions in order.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Timeline ¶
type Timeline struct {
// contains filtered or unexported fields
}
Timeline is safe for concurrent use. The zero value is ready: nothing submitted, nothing completed.
func (*Timeline) Fail ¶
Fail ends the timeline: every waiter, now and later, gets err for a number not yet completed (a lost device completes nothing more).
func (*Timeline) Signal ¶
Signal completes every number up to seq. A seq at or below Completed is ignored: completions only move forward.