alloc_observe.suppress
Internal implementation documentation
Defined in alloc_observe.
Increments the observation suppression depth counter on the current thread, asserting that depth does not overflow an eight-bit integer, and returns a suppression token that decrements the counter upon deinitialization.
Source
Source: lib/alloc/observe/src/protocol.zig:717
zig
/// Increments the observation suppression depth counter on the current thread,/// asserting that depth does not overflow an eight-bit integer, and returns a/// suppression token that decrements the counter upon deinitialization. In/// disabled builds, the call returns an inert token. Active suppression/// prevents the creation of new spans and silent contexts on the calling thread/// without altering spans that are already in progress.pub inline fn suppress() Suppression { if (comptime !enabled) return .{}; std.debug.assert(callback_depth < std.math.maxInt(u8)); callback_depth += 1; return .{};}Source: lib/alloc/observe/src/root.zig:510
zig
/// Increments the observation suppression depth counter on the current thread,/// asserting that depth does not overflow an eight-bit integer, and returns a/// suppression token that decrements the counter upon deinitialization. In/// disabled builds, the call returns an inert token. Active suppression/// prevents the creation of new spans and silent contexts on the calling thread/// without altering spans that are already in progress.pub const suppress = protocol.suppress;Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |