Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallStack ¶
func (*CallStack) Run ¶
Run executes the callback functions in the CallStack in reverse order. If abortOnError is true and any of the callback functions return an error, the execution stops and returns that error. If abortOnError is false, all callback functions are executed, regardless of errors, and the errors returned by the callbacks are combined with errors.Join. The callbacks registered at the time of the call are executed without holding the CallStack lock, so a callback may safely call Add; callbacks added during execution are not executed by the current call. The calling flag is set to 1 during the execution and reset to 0 after execution. If the CallStack is empty, Run returns nil.