View Source cets_long (cets v0.2.0)
Link to this section Summary
Types
Extra logging information.
User provided function to execute.
The generic result of execution.
Link to this section Types
-type log_info() :: map().
-type task_fun() :: fun(() -> task_result()).
-type task_result() :: term().
Link to this section Functions
-spec run_spawn(log_info(), task_fun()) -> task_result().
Spawns a new process to do some memory-intensive task.
This allows to reduce GC on the parent process. Waits for function to finish. Handles errors. Returns result from the function or crashes (i.e. forwards an error).-spec run_tracked(log_info(), task_fun()) -> task_result().
Runs function Fun
.