diff options
| author | Emile Joubert <emile@rabbitmq.com> | 2013-04-10 11:12:30 +0100 |
|---|---|---|
| committer | Emile Joubert <emile@rabbitmq.com> | 2013-04-10 11:12:30 +0100 |
| commit | 7fabea777688d2ae191e35d63e9dab77a2205160 (patch) | |
| tree | bd7d5139455d6dcb26aa999d4a01ad9dd7015b6e /src/pmon.erl | |
| parent | 974dad425efc3e25d35c49b988973569f63a8b61 (diff) | |
| parent | 2d7e253cd6d6ede93be67a1631a57d63380aea0c (diff) | |
| download | rabbitmq-server-git-7fabea777688d2ae191e35d63e9dab77a2205160.tar.gz | |
Merged stable into default
Diffstat (limited to 'src/pmon.erl')
| -rw-r--r-- | src/pmon.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pmon.erl b/src/pmon.erl index 54c3fc348b..ed32b8b2cb 100644 --- a/src/pmon.erl +++ b/src/pmon.erl @@ -19,6 +19,8 @@ -export([new/0, monitor/2, monitor_all/2, demonitor/2, is_monitored/2, erase/2, monitored/1, is_empty/1]). +-compile({no_auto_import, [monitor/2]}). + -ifdef(use_specs). %%---------------------------------------------------------------------------- @@ -48,7 +50,9 @@ monitor(Item, M) -> false -> dict:store(Item, erlang:monitor(process, Item), M) end. -monitor_all(Items, M) -> lists:foldl(fun monitor/2, M, Items). +monitor_all([], M) -> M; %% optimisation +monitor_all([Item], M) -> monitor(Item, M); %% optimisation +monitor_all(Items, M) -> lists:foldl(fun monitor/2, M, Items). demonitor(Item, M) -> case dict:find(Item, M) of |
