anchor.diff:          {'EXIT', _, Reason} ->
               exit(Reason);
           {'$async_req', From, get_result} ->
  -            reply(From, Result);
  +            handle_get_result(From, Result);
           {'$async_req', From, {register_child_async, _Pid}} ->
               %% We don't expect register requests at this point, but it's
               %% possible to write a correct async that has such behavior. If we
  
positive.code:         _ ->
              async_loop_with_result(ParentMRef, Result)
      end.
  
  call(Pid, Req) ->
      [{Pid, R}] = call_many([Pid], Req),
  
negative.code: async_loop_wait_result(ParentMRef, Child, Reply, ChildAsyncs) ->
      receive
          {'DOWN', ParentMRef, _, _, Reason} ->
              terminate_now(Reason, [Child | ChildAsyncs]);
          {'EXIT', Child, Reason} ->
              terminate_on_query(ParentMRef, {child_died, Reason}, ChildAsyncs);
          %% note, we don't assume that this comes from the parent, because we
          %% can be terminated by parent async, for example, which is not the
          %% actual parent of our process
          {'EXIT', _, Reason} ->
              terminate_now(Reason, [Child | ChildAsyncs]);
          {'$async_req', From, {register_child_async, Pid}} ->
              reply(From, ok),
              async_loop_wait_result(ParentMRef, Child,
                                     Reply, [Pid | ChildAsyncs]);
          {Reply, Result} ->
              async_loop_handle_result(ParentMRef, Child, ChildAsyncs, Result);
          {'$async_msg', Msg} ->
              Child ! Msg,
              async_loop_wait_result(ParentMRef, Child, Reply, ChildAsyncs)
      end.
  
  terminate_now(Reason, Children) ->
      misc:terminate_and_wait(Reason, Children),
      exit(Reason).
  
  terminate_on_query(ParentMRef, Reason, Children) ->
      misc:terminate_and_wait(Reason, Children),
      async_loop_with_result(ParentMRef, {die, Reason}).
  
  async_loop_handle_result(ParentMRef, Child, ChildAsyncs, Result) ->
      unlink(Child),
      ?flush({'EXIT', Child, _}),
  
      misc:terminate_and_wait(shutdown, ChildAsyncs),
  
      case Result of
          {ok, Success} ->
              async_loop_with_result(ParentMRef, {reply, Success});
          {raised, _} = Raised ->
              async_loop_with_result(ParentMRef, {die, Raised})
      end.
  
  async_loop_with_result(ParentMRef, Result) ->
      receive
  