[erlang-questions] erlang:monitor(node, NodeName) could obsolate monitor_node/2

Ulf Wiger ulf@REDACTED
Fri Oct 31 17:22:42 CET 2008

This seems reasonable. The function that's harder to replace is
net_kernel:monitor_nodes(Bool), which also delivers {nodeup,N}
messages. One could also argue that given the existence of
net_kernel:monitor_nodes/[1,2], no other node monitoring function
is really needed.  ;-)

Ulf W

2008/10/31 Andras Georgy Bekes <bekesa@REDACTED>:
> Hi,
> >From the documentation:
> "erlang:monitor(Type, Item) -> MonitorRef:
> ...
> Currently only processes can be monitored, i.e. the only allowed Type
> is 'process', but other types may be allowed in the future."
> It seems to me that a new type 'node' could be allowed easily, using the
> node name as the reference to the monitored object. The delivered
> message obvoisly should be {'DOWN', MonitorRef, node, NodeName, Info}.
> This could completely take over the role of the current monitor_node/2,
> which could be obsolated.
> Questions: Are there any uses of the current monitor_node/2 that can not
> be done (easily) with the above extension of monitor/2 ?
> Are there any reasons for having two different monitoring methods for
> nodes and processes, besides history?
> If no, I think we should take this step.
>        Georgy
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list