Events/Observer pattern

doublec chris.double@REDACTED
Thu Nov 24 00:05:36 CET 2005


I want to have a process that sends information out to other processes at regular intervals. Those other processes should be able to register to receive information or unregister to stop receiving them. Classic 'observer' pattern stuff in OO.

I thought of having the information provider process accept pid's on register, and when it needs to send out the information it just goes over the list of pid's sending a message to the receiver. 

Is that a reasonable approach? Is there anything in the standard library that provides this functionality already that I should be looking at?
_________________________________________________________
Sent using Mail2Forum (http://m2f.sourceforge.net)



More information about the erlang-questions mailing list