aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-04-15 11:57:40 +0200
committerFredrik Gustafsson <[email protected]>2013-04-15 11:57:40 +0200
commit8e236f7c5a0c6383e5f604a781e68b1685127e15 (patch)
treefaf91cbdaa25d71b01e5bfddcfda7bb1d675e7c5 /lib/tools
parentf7641c8aafecc7b54b3f6f226892f825ac19f63a (diff)
parentc82e9fad33302ff24fdddbd50f110c06d4eb81d4 (diff)
downloadotp-8e236f7c5a0c6383e5f604a781e68b1685127e15.tar.gz
otp-8e236f7c5a0c6383e5f604a781e68b1685127e15.tar.bz2
otp-8e236f7c5a0c6383e5f604a781e68b1685127e15.zip
Merge branch 'lh/demonitor-flush/OTP-11039' into maint
* lh/demonitor-flush/OTP-11039: Use erlang:demonitor(Ref, [flush]) where applicable
Diffstat (limited to 'lib/tools')
-rw-r--r--lib/tools/src/fprof.erl8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/tools/src/fprof.erl b/lib/tools/src/fprof.erl
index 4cbb910f11..877218bda0 100644
--- a/lib/tools/src/fprof.erl
+++ b/lib/tools/src/fprof.erl
@@ -1226,10 +1226,7 @@ spawn_3step(Spawn, FunPrelude, FunAck, FunBody)
MRef = erlang:monitor(process, Parent),
receive
{Parent, Ref, Go} ->
- erlang:demonitor(MRef),
- receive {'DOWN', MRef, _, _, _} -> ok
- after 0 -> ok
- end,
+ erlang:demonitor(MRef, [flush]),
FunBody(Go);
{'DOWN', MRef, _, _, _} ->
ok
@@ -1238,8 +1235,7 @@ spawn_3step(Spawn, FunPrelude, FunAck, FunBody)
MRef = erlang:monitor(process, Child),
receive
{Child, Ref, Ack} ->
- erlang:demonitor(MRef),
- receive {'DOWN', MRef, _, _, _} -> ok after 0 -> ok end,
+ erlang:demonitor(MRef, [flush]),
try FunAck(Ack) of
{Result, Go} ->
catch Child ! {Parent, Ref, Go},