anchor.diff:      exit_reason = normal,
       flags = #process_flags{},
       message_counter = 1,
  -    messages_new = queue:new(),
  -    messages_old = queue:new(),
  +    message_queue = queue:new(),
       event = none,
       notify_when_ready = {Pid, true},
       receive_counter = 1,
  
positive.code:         false
      end,
    {{skip_timeout, AddMessage}, delay_notify(Notification, UpdatedInfo)}.
  
  has_matching_or_after(PatternFun, Timeout, Location, InfoIn, Mode) ->
    {Result, NewOldMessages} = has_matching_or_after(PatternFun, Timeout, InfoIn),
    UpdatedInfo = update_messages(Result, NewOldMessages, InfoIn),
    case Mode of
      non_blocking -> {Result, UpdatedInfo};
      blocking ->
        case Result =:= false of
          true ->
            ?debug_flag(?loop, blocked),
            NewInfo =
              case InfoIn#concuerror_info.status =:= waiting of
                true ->
                  MessageList = [D || #message{data = D} <- queue:to_list(NewOldMessages)],
                  Notification = {blocked, Location, MessageList},
                  process_loop(notify(Notification, UpdatedInfo));
                false ->
                  process_loop(set_status(UpdatedInfo, waiting))
              end,
            has_matching_or_after(PatternFun, Timeout, Location, NewInfo, Mode);
          false ->
            ?debug_flag(?loop, ready_to_receive),
            NewInfo = process_loop(InfoIn),
            {FinalResult, FinalNewOldMessages} =
              has_matching_or_after(PatternFun, Timeout, NewInfo),
            FinalInfo = update_messages(Result, FinalNewOldMessages, NewInfo),
            {FinalResult, FinalInfo}
        end
    end.
  
  update_messages(Result, NewOldMessages, Info) ->
    case Result =:= false of
      true ->
        Info#concuerror_info{
          messages_new = queue:new(),
          messages_old = NewOldMessages};
      false ->
        Info#concuerror_info{
          messages_new = NewOldMessages,
          messages_old = queue:new()}
    end.      
  
  has_matching_or_after(PatternFun, Timeout, Info) ->
    #concuerror_info{messages_new = NewMessages,
                     messages_old = OldMessages} = Info,
    {Result, NewOldMessages} =
      fold_with_patterns(PatternFun, NewMessages, OldMessages),
    AfterOrMessage =
      case Result =:= false of
        false -> Result;
        true ->
          case Timeout =:= infinity of
            false -> 'after';
            true -> false
          end
      end,
    {AfterOrMessage, NewOldMessages}.
  
  fold_with_patterns(PatternFun, NewMessages, OldMessages) ->
    {Value, NewNewMessages} = queue:out(NewMessages),
    ?debug_flag(?receive_, {inspect, Value}),
    case Value of
      {value, #message{data = Data} = Message} ->
        case PatternFun(Data) of
          true  ->
            ?debug_flag(?receive_, matches),
            {Message, queue:join(OldMessages, NewNewMessages)};
          false ->
            ?debug_flag(?receive_, doesnt_match),
            NewOldMessages = queue:in(Message, OldMessages),
            fold_with_patterns(PatternFun, NewNewMessages, NewOldMessages)
        end;
      empty ->
        {false, OldMessages}
    end.
  
  %%------------------------------------------------------------------------------
  
  
negative.code:             catch error:badarg -> []
              end;
            messages ->
              #concuerror_info{message_queue = Queue} = TheirInfo,
              [M || #message{data = M} <- queue:to_list(Queue)];
            message_queue_len ->
              #concuerror_info{message_queue = Queue} = TheirInfo,
              queue:len(Queue);
            registered_name ->
              #concuerror_info{processes = Processes} = TheirInfo,
  