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

Andras Georgy Bekes bekesa@REDACTED
Fri Oct 31 16:54:15 CET 2008


>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.


More information about the erlang-questions mailing list