pub fn record_blocking(event: Event)Expand description
Write an event synchronously, without the writer thread and without any lock.
The synchronous escape hatch for the three paths where the async world is
gone or going: the panic hook, record_caught_panic, and the signal task
immediately before std::process::exit. One O_APPEND write(2) under
PIPE_BUF, a sync_data, and return — microseconds.
Taking the compaction lock here would be a blocking acquisition on both of
those paths. flock is per-fd within a process, so an actor panic while
holding that lock would self-deadlock the hook, and a second Codewhale
process sharing CODEWHALE_HOME would hang Ctrl-C.
A no-op when unarmed, which is what makes a disabled user’s panic write nothing and create no directory.