We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-spec lock_objects(pid(), objs()) -> ok. %% lock_objects(Agent, Objects) -> lists:foreach(fun({Obj, Mode}) when Mode == read; Mode == write -> lock_nowait(Agent, Obj, Mode); ({Obj, Mode, Where}) when Mode == read; Mode == write -> lock_nowait(Agent, Obj, Mode, Where); ({Obj, Mode, Where, Req}) when (Mode == read orelse Mode == write) andalso (Req == all orelse Req == any orelse Req == majority orelse Req == majority_alive orelse Req == all_alive) -> lock_nowait(Agent, Obj, Mode, Where); (L) -> error({illegal_lock_pattern, L}) end, Objects).
The text was updated successfully, but these errors were encountered:
Indeed. Will fix.
Sorry, something went wrong.
No branches or pull requests
-spec lock_objects(pid(), objs()) -> ok.
%%
lock_objects(Agent, Objects) ->
lists:foreach(fun({Obj, Mode}) when Mode == read; Mode == write ->
lock_nowait(Agent, Obj, Mode);
({Obj, Mode, Where}) when Mode == read; Mode == write ->
lock_nowait(Agent, Obj, Mode, Where);
({Obj, Mode, Where, Req})
when (Mode == read orelse Mode == write)
andalso (Req == all
orelse Req == any
orelse Req == majority
orelse Req == majority_alive
orelse Req == all_alive) ->
lock_nowait(Agent, Obj, Mode, Where);
(L) ->
error({illegal_lock_pattern, L})
end, Objects).
The text was updated successfully, but these errors were encountered: