gen_event and multiple handler ``instances''

Vance Shipley vances@REDACTED
Mon May 3 23:57:32 CEST 2004


When you add a handler you may specify an identifier so that
you can address a specific instance of a handler:

   gen_event:add_handler(temp_listener_events, {lemp_handler, 1}, Args)
   gen_event:add_handler(temp_listener_events, {lemp_handler, foo}, Args)

   [{lemp_handler, 1}, {lemp_handler, foo}]


On Mon, May 03, 2004 at 02:11:46PM -0700, Dustin Sallings wrote:
}  	It seems that gen_event doesn't want you to have multiple handlers 
}  from the same module registered.  I was hoping for something more like 
}  NSNotificationCenter (if you're familiar with Objective C) where I 
}  could register something more like a process.  Does something exist 
}  that is more suited to my needs?

More information about the erlang-questions mailing list