anchor.diff:  
   subtract_sorted_keys([R0|Rs], [R0|Ls], Acc) ->
     subtract_sorted_keys(Rs, Ls, Acc);
  -subtract_sorted_keys([_R0|Rs], [L0|Ls], Acc) ->
  -  subtract_sorted_keys(Rs, Ls, [L0|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).
  +  lists:reverse(Acc);
  +subtract_sorted_keys([], Ls, Acc) ->
  +  lists:reverse(Acc) ++ Ls.
   
   tick_period() ->
     %% In milliseconds.
  
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:   ets:insert_new(?MODULE, [{Key, Pid} || Key <- Keys]).
        
  should_lock_more(Keys, Pid) ->
    lists:foldl(fun(_Key, {false, _KeysToTry}) ->
                    {false, []};
                   (Key, {true, KeysToTry}) ->
                    case ets:lookup(?MODULE, Key) of
                      [] ->
                        {true, [Key|KeysToTry]};
                      [{Key, Pid}] ->
                        {true, KeysToTry};
                      [{Key, _OtherPid}] ->
                        {false, []}
                    end
                end
               , {true, []}
               , Keys).
  
  release_lock_int(Keys) ->
    lists:foreach( fun(Key) ->
                       ets:delete(?MODULE, Key)
  