anchor.diff:  %% queue or spawned and placed in the first queue. Thus, there are
   %% only elements in one queue at a time, so share an ets table queue
   %% and tag it with a positive length if it contains the first queue, a
  -%% negative length if it contains the second queue. The case -1 is
  -%% handled differently for backwards compatibility reasons.
  +%% negative length if it contains the second queue.
   
   %% ---------------------------------------------------------------------------
   %% # start/3
  
positive.code: %% several accepting transports are started concurrently. Deal with
  %% this by placing the started transports in a new queue of transport
  %% processes waiting for an association.
  %%
  %% Since only one of this queue and the existing queue of controlling
  %% processes waiting for a transport to be started can be non-empty at
  %% any given time, implement both queues in the same ets table. The
  %% absolute value of the first element of the 2-tuple is the queue
  %% length, the sign says which queue it is.
  
  %% downgrade/1
  %%
  %% Revert to the pre-pool_size representation when possible, for
  %% backwards compatibility in the case that the pool_size option
  %% hasn't been used.
  
  downgrade(#listener{pending = {-1,Q}} = S) ->
      TPid = ets:first(Q),
      ets:delete(Q, TPid),
      S#listener{pending = [TPid | {0,Q}]};
  
  downgrade(S) ->
      S.
  
  %% ---------------------------------------------------------------------------
  %% # code_change/3
  
negative.code: %% # handle_call/3
  %% ---------------------------------------------------------------------------
  
  handle_call({{accept, Ref}, Pid}, _, #listener{ref = Ref,
                                                 pending = {N,Q},
                                                 count = K}
                                       = S) ->
      TPid = accept(Ref, Pid, S),
      {reply, {ok, TPid}, S#listener{pending = {N-1,Q},
                                     count = K+1}};
  
  handle_call(_, _, State) ->
      {reply, nok, State}.
  