diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-05-16 18:39:31 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-05-17 13:46:04 +0200 |
commit | a4217eeeda0092b66970edda7b585eb4c4796700 (patch) | |
tree | 165b8a5270564528540b4112bcbbcc1818d4e2d5 /lib/percept/src/percept_db.erl | |
parent | f2924fe206b37766cc137f8dbeca746a035abfdb (diff) | |
download | otp-a4217eeeda0092b66970edda7b585eb4c4796700.tar.gz otp-a4217eeeda0092b66970edda7b585eb4c4796700.tar.bz2 otp-a4217eeeda0092b66970edda7b585eb4c4796700.zip |
percept: Fix unmatched return warnings
Diffstat (limited to 'lib/percept/src/percept_db.erl')
-rw-r--r-- | lib/percept/src/percept_db.erl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/percept/src/percept_db.erl b/lib/percept/src/percept_db.erl index 7599a1cd74..6cbe3ce022 100644 --- a/lib/percept/src/percept_db.erl +++ b/lib/percept/src/percept_db.erl @@ -94,7 +94,7 @@ restart(PerceptDB)-> -spec do_start()-> pid(). do_start()-> - Pid = spawn( fun() -> init_percept_db() end), + Pid = spawn(fun() -> init_percept_db() end), erlang:register(percept_db, Pid), Pid. @@ -117,17 +117,17 @@ stop() -> %% @private %% @doc Stops the percept database, with a synchronous call. --spec stop_sync(pid())-> true. +-spec stop_sync(pid()) -> true. -stop_sync(Pid)-> +stop_sync(Pid) -> MonitorRef = erlang:monitor(process, Pid), - stop(), + _ = stop(), receive {'DOWN', MonitorRef, _Type, Pid, _Info}-> true after ?STOP_TIMEOUT-> - erlang:demonitor(MonitorRef, [flush]), - exit(Pid, kill) + erlang:demonitor(MonitorRef, [flush]), + exit(Pid, kill) end. %% @spec insert(tuple()) -> ok @@ -185,19 +185,19 @@ consolidate() -> init_percept_db() -> % Proc and Port information - ets:new(pdb_info, [named_table, private, {keypos, #information.id}, set]), + pdb_info = ets:new(pdb_info, [named_table, private, {keypos, #information.id}, set]), % Scheduler runnability - ets:new(pdb_scheduler, [named_table, private, {keypos, #activity.timestamp}, ordered_set]), + pdb_scheduler = ets:new(pdb_scheduler, [named_table, private, {keypos, #activity.timestamp}, ordered_set]), % Process and Port runnability - ets:new(pdb_activity, [named_table, private, {keypos, #activity.timestamp}, ordered_set]), + pdb_activity = ets:new(pdb_activity, [named_table, private, {keypos, #activity.timestamp}, ordered_set]), % System status - ets:new(pdb_system, [named_table, private, {keypos, 1}, set]), + pdb_system = ets:new(pdb_system, [named_table, private, {keypos, 1}, set]), % System warnings - ets:new(pdb_warnings, [named_table, private, {keypos, 1}, ordered_set]), + pdb_warnings = ets:new(pdb_warnings, [named_table, private, {keypos, 1}, ordered_set]), put(debug, 0), loop_percept_db(). |