[erlang-questions] Sending a message to all linked processes

Lennart Öhman Lennart.Ohman@REDACTED
Thu May 29 10:50:12 CEST 2008


Hi John, as a note to the audience - the following is not something I would consider  good practice. But I do also appreciate that sometimes you face "difficult" situations where the better practice of "book keeping" is not possible.

Take a look at the BIF process_info. You can found out, among many things, to where a particular process has links.

Best Regards
Lennart


-------------------------------------------------------------------------------
Lennart Öhman                    phone: +46 8 587 623 27
Sjöland & Thyselius Telecom AB   cell : +46 70 552 6735
Hälsingegatan 43, 10th floor     fax  : +46 8 667 8230
SE-113 31 STOCKHOLM, SWEDEN      email: lennart.ohman@REDACTED
-----Original Message-----
From: erlang-questions-bounces@REDACTED [mailto:erlang-questions-bounces@REDACTED] On Behalf Of John M. Nordgaard
Sent: den 29 maj 2008 10:27
To: erlang-questions@REDACTED
Subject: [erlang-questions] Sending a message to all linked processes

Hi all,

Been looking through the documentation in search of an answer, and have not been able to locate one, so I hope I haven't missed the obvious here... my Erlang mileage is still nothing to brag about. :-)

I was wondering if there is a simple and straightforward way to send a message to all linked processes. Now, I am aware that a process exit signal is transmitted in a functionally similar manner, so it seems that at least some form of "broadcast to all linked processes" operation exists within the runtime. But is it possible to invoke such functionality directly from source code?

The reason I ask is that I'm doing some research on systems with a very large number of highly autonomous agents, and would like to be able to broadcast messages to all agents without the hassle of manual PID book keeping.

All hints and suggestiong are greatly appreciated! :-)

- john.



_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://www.erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list