Class Lease

Class Documentation

class Lease

Declaration: final

A scoped request to collect a channel.

Multiple requests coexist; releasing a handle never erases already captured records or another request. Move/release on any thread with exclusive access to this particular handle. Retained request state survives collector destruction; it does not retain an adapter.

Public Functions

Lease() = default

Create an empty lease requesting no channel.

~Lease()

Release this channel request without erasing pending/published records or another request.

Lease(Lease &&other) noexcept

Transfer retained channel-request state, leaving other empty.

Handle access must be exclusive.

Lease &operator=(Lease &&other) noexcept

Reset this request then transfer other; no collector/adapter lifetime is retained.

Lease(const Lease&) = delete
Lease &operator=(const Lease&) = delete
void reset() noexcept

Idempotently release this request from any thread with exclusive handle access.

Counts affect the next begin_poll latch, not already captured records.