diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2013-01-08 16:48:46 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2013-01-08 16:48:46 +0000 |
| commit | 6c04eb980db74f45d1365f76eae6259f2bf17238 (patch) | |
| tree | 7fbd1e638be66f54a8832e635be5ab1a242f3479 /src/pmon.erl | |
| parent | f649f7e82c2d08a57d7cf7efe8d04752bdbb4046 (diff) | |
| parent | 3706818cb60bdb4372fb750d9ffd23ec93f32ecb (diff) | |
| download | rabbitmq-server-git-6c04eb980db74f45d1365f76eae6259f2bf17238.tar.gz | |
merge 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 1aeebb72bc..3789811923 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 |
