[erlang-questions] fire off a task via erlang

Wes James comptekki@REDACTED
Thu May 13 17:43:48 CEST 2010


On Thu, May 13, 2010 at 9:34 AM, Evans, Matthew <mevans@REDACTED> wrote:
> You could certainly use the timer module. But there is a small performance overhead.
>
> Maybe a better choice would be each task to be its own gen_server and use erlang:send_after(Delay,self(),Message).
>
> IRC that has a lower overhead. You would call the first instance of send_after in the init function, and then the message would be caught by handle_info, where you restart the timer.

Matt,

I was wondering about erlang's concurrency capabilities too.  I've
only done some "sequential" erlang.

thx,

-wes


More information about the erlang-questions mailing list