diff options
author | Peter Andersson <[email protected]> | 2012-03-22 18:46:41 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2012-03-22 19:24:25 +0100 |
commit | 88c935d87a9878016e07b5a3f42bc8efe30b1eea (patch) | |
tree | a8d03b1e70f6d20deab0ee0ff0cc3ed1930c2ebf /lib/test_server/src/test_server_sup.erl | |
parent | c2a3647e471bb08de24d867bc7c3f541e2f7a15d (diff) | |
download | otp-88c935d87a9878016e07b5a3f42bc8efe30b1eea.tar.gz otp-88c935d87a9878016e07b5a3f42bc8efe30b1eea.tar.bz2 otp-88c935d87a9878016e07b5a3f42bc8efe30b1eea.zip |
Fix various problems with the user timetrap implementation
Diffstat (limited to 'lib/test_server/src/test_server_sup.erl')
-rw-r--r-- | lib/test_server/src/test_server_sup.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/test_server/src/test_server_sup.erl b/lib/test_server/src/test_server_sup.erl index d85d1658c3..68d6198bb7 100644 --- a/lib/test_server/src/test_server_sup.erl +++ b/lib/test_server/src/test_server_sup.erl @@ -100,8 +100,12 @@ timetrap_cancel(Handle) -> unlink(Handle), MonRef = erlang:monitor(process, Handle), exit(Handle, kill), - receive {'DOWN',MonRef,_,_,_} -> ok after 2000 -> ok end. - + receive {'DOWN',MonRef,_,_,_} -> ok + after + 2000 -> + erlang:demonitor(MonRef, [flush]), + ok + end. capture_get(Msgs) -> receive @@ -111,7 +115,6 @@ capture_get(Msgs) -> lists:reverse(Msgs) end. - messages_get(Msgs) -> receive Msg -> @@ -120,7 +123,6 @@ messages_get(Msgs) -> lists:reverse(Msgs) end. - timecall(M, F, A) -> Befor = erlang:now(), Val = apply(M, F, A), |