|
|
@ -9,8 +9,6 @@ |
|
|
|
%% 数组数量 |
|
|
|
-define(eGLockSize, 2097152). |
|
|
|
|
|
|
|
-compile([export_all]). |
|
|
|
|
|
|
|
-export([ |
|
|
|
tryLock/1 |
|
|
|
, tryLock/2 |
|
|
@ -144,12 +142,6 @@ getKexIxs([Key | Keys], IxAcc) -> |
|
|
|
KeyIx = erlang:phash2(Key, ?eGLockSize), |
|
|
|
getKexIxs(Keys, ?CASE(lists:member(KeyIx, IxAcc), IxAcc, [KeyIx | IxAcc])). |
|
|
|
|
|
|
|
|
|
|
|
getKexIxs1([], IxAcc) -> IxAcc; |
|
|
|
getKexIxs1([Key | Keys], IxAcc) -> |
|
|
|
KeyIx = erlang:phash2(Key, ?eGLockSize), |
|
|
|
getKexIxs1(Keys, ordsets:add_element(KeyIx, IxAcc)). |
|
|
|
|
|
|
|
doApply({M, F, Args}) -> |
|
|
|
apply(M, F, Args); |
|
|
|
doApply({Fun, Args}) -> |
|
|
|