anchor.diff:  enter_loop(Module, State, Options) ->
       ok = register_listeners(Options),
       ?MODULE:loop(#st{module=Module, state=State}, infinity).
  +
  +
  +cast(Pid, Message) ->
  +    Pid ! {'$couch_event_cast', Message},
  +    ok.
   
   
   do_init(Module, Arg, Options) ->
  
positive.code:     receive
          {'$couch_event', DbName, Event} ->
              do_event(St, DbName, Event);
          Else ->
              do_info(St, Else)
      after Timeout ->
  
negative.code:     end.
  
  
  do_cast(#st{module=Module, state=State}=St, Message) ->
      case (catch Module:handle_cast(Message, State)) of
          {ok, NewState} ->
              ?MODULE:loop(St#st{state=NewState}, infinity);
          {ok, NewState, Timeout} when is_integer(Timeout), Timeout >= 0 ->
              ?MODULE:loop(St#st{state=NewState}, Timeout);
          {stop, Reason, NewState} ->
              do_terminate(Reason, St#st{state=NewState});
          Else ->
              erlang:error(Else)
      end.
  
  
  do_info(#st{module=Module, state=State}=St, Message) ->
      case (catch Module:handle_info(Message, State)) of
          {ok, NewState} ->
  