Expand description
Which panics a process survives.
Release builds unwind, but a Tilo process still ends on the first panic: on starting a runtime or a thread through this crate, it installs a hook that aborts once every earlier hook (a crash log) has run, so code keeps the abort-on-panic contract it is written against and a task’s panic is never swallowed by its runtime.
The one exception is a thread inside isolate, where the panic unwinds to the
boundary and the helper’s owner decides what happens next — the compositor
isolates its helpers this way. Debug and test builds keep unwinding everywhere;
under panic = "abort" isolate only runs its body.
The abort writes its own backtrace, captured at the panic, rather than leaving
it to std’s hook: that one prints only what RUST_BACKTRACE asks for, and its
short form prints no frames at all in a build without a symbol table (every
development build is stripped). A process that ends says where it ended,
whatever the environment and the symbol table are.
Functions§
- abort_
outside_ boundaries - Abort the process on any panic outside
isolate, after the hooks installed before this one (which it calls first) have reported it. Idempotent; a hook installed later should chain to this one. - is_
isolated - Whether the calling thread is inside
isolate: a panic hook that aborts the process for any other panic returns for this one. - isolate
- Run
bodyas a panic boundary: a panic inside it (on this thread) unwinds to here and is returned asErrwith its payload, andis_isolatedanswerstruemeanwhile so the process’s panic hook lets it unwind. - message
- The panic message in
payload, for a log line.