Skip to documentation
SLOP

alloc_observe.Sink

Reference alloc_observe Sink

Internal implementation documentation

Defined in alloc_observe.

A delivery target holding a type-erased context pointer and a function pointer that accepts an event by value and returns void.

API (2)

Fields and members

Public fields and members.

No direct callersNo direct callsalloc_observeSink
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/alloc/observe/src/protocol.zig:206

zig
/// A delivery target holding a type-erased context pointer and a function/// pointer that accepts an event by value and returns `void`. Delivery occurs/// synchronously on the thread finishing an observed span, directly in the/// caller execution path with no intermediate queue. Because events from/// distinct threads can arrive concurrently, the callback implementation must/// synchronize access to shared state. The sink provides no internal buffer,/// capacity management, dropping strategy, or error reporting mechanism. The/// caller must guarantee that the `Sink` struct storage itself, the callback/// context, and the callback code remain stable and valid in memory until/// session shutdown returns.pub const Sink = struct {    context: *anyopaque,    record: *const fn (context: *anyopaque, event: Event) void,};

Source: lib/alloc/observe/src/root.zig:427

zig
/// A delivery target holding a type-erased context pointer and a function/// pointer that accepts an event by value and returns `void`. Delivery occurs/// synchronously on the thread finishing an observed span, directly in the/// caller execution path with no intermediate queue. Because events from/// distinct threads can arrive concurrently, the callback implementation must/// synchronize access to shared state. The sink provides no internal buffer,/// capacity management, dropping strategy, or error reporting mechanism. The/// caller must guarantee that the `Sink` struct storage itself, the callback/// context, and the callback code remain stable and valid in memory until/// session shutdown returns.pub const Sink = protocol.Sink;

Audit

Definitions1
Public names1
Members2
Version26.7.0
Revisiondaab053ee433