[erlang-questions] gen_event identifier

Ulf Wiger ulf@REDACTED
Mon May 19 20:03:16 CEST 2014


When calling gen_event:add_handler(EventMgr, {Module, Id}, Args), pass along Id as part of Args, and store it in the handler state.

BR,
Ulf W

On 19 May 2014, at 18:50, Camille Troillard <lists@REDACTED> wrote:

> Hello,
> 
> Two gen_event handlers are disambiguated by using {Module, Id} as the Handler parameters of gen_event:add_handler/3.
> 
> I would like to know how I can get access to the Id part from within a Module:handle_event/2 callback. Is it possible?
> 
> Thanks!
> 
> 
> Best,
> Cam
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
http://feuerlabs.com






More information about the erlang-questions mailing list