Events/Observer pattern

Corrado Santoro csanto@REDACTED
Thu Nov 24 15:19:02 CET 2005



Matthias Lang wrote:
> I don't think there's anything in the standard library which does
> that.
Why? Don't you think that gen_event could exactly fit in the problem?

--Corrado

> doublec writes:
> 
>  > 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?

-- 
======================================================
Eng. Corrado Santoro, Ph.D.

University of Catania - Engineering Faculty
Department of Computer Science and
Telecommunications Engineering
Viale A. Doria, 6 - 95125 CATANIA (ITALY)

Tel: +39 095 7382380
      +39 095 7387035
      +39 095 7382365
      +39 095 7382364

VoIP: sip:7035@REDACTED

Fax: +39 095 7382397

EMail: csanto@REDACTED
Personal Home Page:
             http://www.diit.unict.it/users/csanto

NUXI Home Page:
             http://nuxi.iit.unict.it
======================================================




More information about the erlang-questions mailing list