anchor.diff:  
   handle_cast({release_lock, ReleaseKeys, Pid},  #s{monitors = M0} = S) ->
     M = case lists:keyfind(Pid, 1, M0) of
  -        {Pid, {Ref, LockedKeys}} when ReleaseKeys == LockedKeys ->
  -          erlang:demonitor(Ref),
  -          release_lock_int(ReleaseKeys),
  -          lists:keydelete(Pid, 1, M0);
           {Pid, {Ref, LockedKeys0}} ->
  -          release_lock_int(ReleaseKeys),
  -          LockedKeys = subtract_sorted_keys(ReleaseKeys, LockedKeys0),
  -          lists:keyreplace(Pid, 1, M0, {Pid, {Ref, LockedKeys}});
  +            case subtract_sorted_keys(ReleaseKeys, LockedKeys0) of
  +              [] ->
  +                erlang:demonitor(Ref),
  +                lists:keydelete(Pid, 1, M0);
  +              LockedKeys ->
  +                lists:keyreplace(Pid, 1, M0, {Pid, {Ref, LockedKeys}})
  +            end;
           false ->
             M0
         end,
  -  {no_reply, S#s{monitors = M}};
  +  {noreply, S#s{monitors = M}};
   handle_cast(_, S) ->
  -  {no_reply, S}.
  +  {noreply, S}.
   
   handle_info({'DOWN', _Ref, process, Pid, _Info}, #s{monitors = M0} = S) ->
     M = case lists:keyfind(Pid, 1, M0) of
  
positive.code:   case lists:keyfind(Pid, 1, M0) of
      {Pid, {_Ref, _Keys}} ->
        %% A process may only have one monitored lock (for now).
        {reply, false, M0, TryLock0};
      false ->
        case try_lock_and_monitor_timeout(Keys, Pid, M0, TryLock0, Timeout) of
          {true, M, TryLock} ->
  
negative.code: 
  subtract_sorted_keys([R0|Rs], [R0|Ls], Acc) ->
    subtract_sorted_keys(Rs, Ls, Acc);
  subtract_sorted_keys([R0|Rs], [L0|Ls], Acc) when R0 < L0 ->
    subtract_sorted_keys(Rs, [L0|Ls], Acc);
  subtract_sorted_keys([R0|Rs], [L0|Ls], Acc) ->
    subtract_sorted_keys([R0|Rs], Ls, [L0|Acc]);
  subtract_sorted_keys(_Rs, [], Acc) ->
    lists:reverse(Acc);
  subtract_sorted_keys([], Ls, Acc) ->
    lists:reverse(Acc) ++ Ls.
  
  tick_period() ->
    %% In milliseconds.
  