<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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?<br>
</blockquote><div><br>There may be a better way, but here's how I do it:<br><br>get_linked_processes() -> [U] = [V||{links,V}<-process_info(self())], U.<br><br>[ LP ! message || LP <- get_linked_processes() ].<br>
<br>I suspect that process_info() isn't particularly cheap, so I recommend reconsidering the bookkeeping.<br><br> - John<br> </div></div>---<br>GuaranteedVPS.com - bandwidth commitments and root starting from $12.98/mo