anchor.diff: -% @copyright 2007-2012 Zuse Institute Berlin,
  +% @copyright 2007-2013 Zuse Institute Berlin,
   
   %   Licensed under the Apache License, Version 2.0 (the "License");
   %   you may not use this file except in compliance with the License.
  
positive.code:                 failed ->
                      %% search others
                      case ets:match(?MODULE, {{'_', PidName}, '$1'}) of
                          [[Pid] | _] = Pids ->
                              %% fill process local cache
  
                              %% This should only happen for client
                              %% processes not registered in a pid_group (failed)
                              %% io:format("Ring is created to find a ~p in ~p ~p~n",
                              %% [PidName, self(), pid_groups:group_and_name_of(self())]),
                              erlang:put(CachedName,
                                         ring_new(lists:flatten(Pids))),
                              Pid;
                          [] ->
                              io:format("***No pid registered for ~p~n",
  
negative.code:     end.
  
  -spec ring_get({list(), list()}) -> {any(), {list(), list()}}.
  ring_get({[], []})        -> {'$dead_code', {[], []}};
  ring_get({[E], []} = Q)   -> {E, Q};
  ring_get({[], L}) -> ring_get({lists:reverse(L), []});
  ring_get({[ E | R ], L})  -> {E, {R, [E|L]}}.
  
  -spec ring_new(list()) -> {list(), list()}.
  ring_new(L) -> {L, []}.
  