View Source AntikytheraCore.GearTask (antikythera v0.5.1)

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).

Summary

Types

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

Functions

Link to this function

exec_wait(mfa, timeout, success_fun, failure_fun)

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