Module e2_task

e2 task behavior.

Copyright © 2011-2016 Garrett Smith

Authors: Garrett Smith ([email protected]).

Description

e2 task behavior.

Tasks are e2_service behaviors that run actively after started.

A task may be delayed after started.

A task may repeat.

For more information see e2 tasks documentation.

Function Index

call/2Sends a message to a task and waits for a reply.
call/3Sends a message to a task and waits for a reply.
cast/2Sends a message to a task without waiting for a reply.
run_once/1Runs the task.
start_link/2Start a linked task.
start_link/3Start a linked task.

Function Details

call/2

call(Task, Msg) -> any()

Equivalent to call(Task, Msg, infinity).

Sends a message to a task and waits for a reply.

call/3

call(Task, Msg, Timeout) -> Reply

Sends a message to a task and waits for a reply.

cast/2

cast(Task, Msg) -> ok

Sends a message to a task without waiting for a reply.

run_once/1

run_once(Task) -> ok

Runs the task.

If the task is repeating, this will not cause subsequent task runs.

start_link/2

start_link(Module, Args) -> any()

Equivalent to start_link(Module, Args, []).

Start a linked task.

start_link/3

start_link(Module, Args, Options) -> {ok, Pid} | {error, Reason}

Start a linked task.

Refer to e2_service:start_link/3 for details.


Generated by EDoc