antikythera v0.4.0 AntikytheraCore.GearTask View Source

A much simplified version of Task module defined in the elixir standard library.

While the standard Task requires the invoker to trap exit in order to handle errors (as it uses spawn_link), this module doesn't link the invoker with the worker (uses spawn_monitor instead). Also this version does not send stacktrace to error_logger (since it doesn't use :proc_lib functions to start child process).

Link to this section Summary

Link to this section Types

Specs

mod_fun_args() :: {module(), atom(), [any()]}

Link to this section Functions

Link to this function

exec_wait(mfa, timeout, success_fun, failure_fun)

View Source

Specs

exec_wait(
  mod_fun_args(),
  non_neg_integer(),
  (a -> r),
  (Antikythera.ErrorReason.t(), Antikythera.ErrorReason.stacktrace() -> r)
) :: r
when a: any(), r: any()