diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2013-01-31 12:32:06 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2013-01-31 12:32:06 +0000 |
| commit | b7341801db96959927882c82848eb491e3c4f0a0 (patch) | |
| tree | f07ea7a74cb835a975d0edd27ea2167addee0a5b /src/pmon.erl | |
| parent | 61e3f3ab3d504fd7b489208076c082679b06d6de (diff) | |
| parent | cd85e92c73b441b208df700ac0a372761f88fba8 (diff) | |
| download | rabbitmq-server-git-b7341801db96959927882c82848eb491e3c4f0a0.tar.gz | |
merge bug25428 into bug25429
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 |
