diff options
author | Badlop <badlop@process-one.net> | 2013-03-14 10:33:02 +0100 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2013-03-14 10:33:02 +0100 |
commit | 9deb294328bb3f9eb6bd2c0e7cd500732e9b5830 (patch) | |
tree | 7e1066c130250627ee0abab44a135f583a28d07f /src/cache_tab.erl | |
parent | list_to_integer/2 only works in OTP R14 and newer (diff) |
Accumulated patch to binarize and indent code
Diffstat (limited to 'src/cache_tab.erl')
-rw-r--r-- | src/cache_tab.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cache_tab.erl b/src/cache_tab.erl index 74f47db6a..95343e4f5 100644 --- a/src/cache_tab.erl +++ b/src/cache_tab.erl @@ -380,11 +380,11 @@ do_setopts(#state{procs_num = N} = State, Opts) -> shrink_size = ShrinkSize}. get_proc_num() -> - case erlang:system_info(logical_processors) of - unknown -> - 1; - Num -> - Num + case catch erlang:system_info(logical_processors) of + Num when is_integer(Num) -> + Num; + _ -> + 1 end. get_proc_by_hash(Tab, Term) -> |