Beaver.Capturer (beaver v0.4.0)

GenServer to run MLIR diagnostic error handler.

The handler should be a function that takes an MLIR diagnostic and returns a value. The return value will be collected by the server and can be retrieved by calling collect/1.

Diagnostic's lifecycle

Note that the diagnostic only lives within the lifecycle of the handler. Prolonging its lifetime by keeping it or sending it to another process will lead to BEAM crash or other unexpected behavior.

Summary

Functions

Attach the diagnostic handler runner to the context and return the handler id.

Returns a specification to start this module under a supervisor.

return the result of the handler

Functions

attach(context, handler)

Attach the diagnostic handler runner to the context and return the handler id.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

collect(pid)

return the result of the handler