aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/misc.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc.erl b/src/misc.erl
index 072b74681..b502971a0 100644
--- a/src/misc.erl
+++ b/src/misc.erl
@@ -455,8 +455,8 @@ best_match(Pattern, Opts) ->
-spec logical_processors() -> non_neg_integer().
logical_processors() ->
case erlang:system_info(logical_processors) of
- unknown -> 1;
- V -> V
+ V when is_integer(V), V >= 2 -> V;
+ _ -> 1
end.
-spec pmap(fun((T1) -> T2), [T1]) -> [T2].