aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/disk_log.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-04-05 13:06:24 +0200
committerLoïc Hoguin <[email protected]>2013-04-05 13:06:24 +0200
commitc82e9fad33302ff24fdddbd50f110c06d4eb81d4 (patch)
tree710881076aed3f2a387acee1a70444a0515c51fb /lib/kernel/src/disk_log.erl
parente72043e3519cb14aabf461849eba959b97e07410 (diff)
downloadotp-c82e9fad33302ff24fdddbd50f110c06d4eb81d4.tar.gz
otp-c82e9fad33302ff24fdddbd50f110c06d4eb81d4.tar.bz2
otp-c82e9fad33302ff24fdddbd50f110c06d4eb81d4.zip
Use erlang:demonitor(Ref, [flush]) where applicable
Diffstat (limited to 'lib/kernel/src/disk_log.erl')
-rw-r--r--lib/kernel/src/disk_log.erl18
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/kernel/src/disk_log.erl b/lib/kernel/src/disk_log.erl
index 0c5af2857e..c238eff12f 100644
--- a/lib/kernel/src/disk_log.erl
+++ b/lib/kernel/src/disk_log.erl
@@ -1914,13 +1914,8 @@ multi_req(Msg, Pids) ->
{'DOWN', Ref, process, Pid, _Info} ->
Reply;
{disk_log, Pid, _Reply} ->
- erlang:demonitor(Ref),
- receive
- {'DOWN', Ref, process, Pid, _Reason} ->
- ok
- after 0 ->
- ok
- end
+ erlang:demonitor(Ref, [flush]),
+ ok
end
end, {error, nonode}, Refs).
@@ -1965,13 +1960,8 @@ monitor_request(Pid, Req) ->
{error, no_such_log};
{disk_log, Pid, Reply} when not is_tuple(Reply) orelse
element(2, Reply) =/= disk_log_stopped ->
- erlang:demonitor(Ref),
- receive
- {'DOWN', Ref, process, Pid, _Reason} ->
- Reply
- after 0 ->
- Reply
- end
+ erlang:demonitor(Ref, [flush]),
+ Reply
end.
req2(Pid, R) ->