Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 2.15 KB

File metadata and controls

52 lines (34 loc) · 2.15 KB

Don't Remember Panicking

A TC39 proposal for both

  • A HostFaultHandler hook for optionally immediately terminating the enclosing unit of computation.
  • A builtin panic method for explicitly invoking HostFaultHandler

Status

The TC39 Process

Achieved Stage 1 as OOM Must Fail-Fast

Co-Champions

  • Mark S. Miller, Agoric (@erights)
  • Peter Hoddie, Moddable (@phoddie)
  • Zbyszek Tenerowicz (@naugtur)
  • Christopher Hiller (@boneskull)

Presentations

What

  • A new Host Hook
HostFaultHandler(faultType, arg = undefined)

to be invoked for various from various internal fault conditions, so the host can react according to the host's policy. Including sudden termination of "Minimal Abortable Unit of Computation", such as an Agent cluster.

  • A new built-in
Reflect.panic(arg = undefined)

so JavaScript code can directly fault to HostFaultHandler.

See @endo/panic for an imperfect ponyfill of the panic function from this proposal.

Why

See OOM Must Fail-Fast for the original motivation and rationale, most of which is still interesting and valid.

See "Don't Remember Panicking" Stage 1 Update (keynote slides, pdf slides) for the expanded motivation and rationale

Acknowledgements

Thanks to Felipe Natal for bring our attention to a problem that

  • revived our interest in this old "OOM Must Fail Fast" proposal.
  • needed the addition of a user panic operation to solve.