diff options
author | Ahmed Omar <[email protected]> | 2011-06-06 10:19:16 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-08-24 15:56:38 +0200 |
commit | c52f5a6220534b9ebd153d5520bc6a01006d7749 (patch) | |
tree | 7d41dd543fd268b83303acf308116df537bbe74f /lib/percept/src | |
parent | f6a77186a608fb08e2ffc65d06c4166b7127e4a0 (diff) | |
download | otp-c52f5a6220534b9ebd153d5520bc6a01006d7749.tar.gz otp-c52f5a6220534b9ebd153d5520bc6a01006d7749.tar.bz2 otp-c52f5a6220534b9ebd153d5520bc6a01006d7749.zip |
Add demonitor to avoid keeping DOWN message in the queue
fix one spec in do_start/0
Diffstat (limited to 'lib/percept/src')
-rw-r--r-- | lib/percept/src/percept_db.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/percept/src/percept_db.erl b/lib/percept/src/percept_db.erl index 52e9afb78f..e827b5345c 100644 --- a/lib/percept/src/percept_db.erl +++ b/lib/percept/src/percept_db.erl @@ -92,7 +92,7 @@ restart(PerceptDB)-> stop_sync(PerceptDB), do_start(). -%% @spec do_start(pid()) -> pid() +%% @spec do_start() -> pid() %% @private %% @doc starts the percept database. @@ -131,6 +131,7 @@ stop_sync(Pid)-> {'DOWN', MonitorRef, _Type, Pid, _Info}-> true after ?STOP_TIMEOUT-> + erlang:demonitor(MonitorRef, [flush]), exit(Pid, kill) end. |