Class ProcessLifetime

Class Documentation

class ProcessLifetime

Declaration: final

Owns the process logging lifetime on an application thread.

Keep an outer guard in main until all contexts, jobs and logging callers (including diagnostics readers) have finished. Nested/overlapping guards share it. The last guard closes every live Log and drains/joins Cheryl’s worker before returning, including when Engine is a shared library. Shutdown is terminal: later guards, new Logs and reopen reject. No producer may outlive the last guard. Release retained native loggers/sinks first; dormant Log facades can be observed and destroyed afterward. Do not construct/destroy guards from a logging callback or DLL entry point.

Public Functions

ProcessLifetime()

Acquire a shared process logging guard on an application thread.

Nested/overlapping guards share one lifetime. Construction after the final lifetime ended rejects; do not acquire from backend callbacks or a DLL entry point.

See also

Detailed guide

~ProcessLifetime() noexcept

Release this guard; the last release closes every live log and joins the shared logging worker.

Stop all producers/diagnostics readers and release native logger/sink references first. Shutdown is terminal; later guards, logs and reopen reject. Do not destroy on a backend callback or DLL entry point.

See also

Detailed guide

ProcessLifetime(const ProcessLifetime&) = delete

Copy/move ownership is disabled; create an independent nested guard instead.

See also

Detailed guide

ProcessLifetime &operator=(const ProcessLifetime&) = delete

Copy/move ownership is disabled; create an independent nested guard instead.

See also

Detailed guide

ProcessLifetime(ProcessLifetime&&) = delete

Copy/move ownership is disabled; create an independent nested guard instead.

See also

Detailed guide

ProcessLifetime &operator=(ProcessLifetime&&) = delete

Copy/move ownership is disabled; create an independent nested guard instead.

See also

Detailed guide