anchor.diff:                  Msg ->
                       erlang:demonitor(Ref, [flush]),
                       Monitors = gb_sets:delete(Ref, S#state.monitors),
  -                    gen_server:reply(From, Msg),
  +                    gen_server:reply(W#waiting.from, Msg),
                       S#state{waiting=NewWaiting, monitors=Monitors}
               end;
           {empty, Waiting} ->
               S
       end.
  +
  +wait_valid(#waiting{timeout=infinity}) ->
  +    true;
  +wait_valid(#waiting{start_time=StartTime, timeout=Timeout}) ->
  +    StartTime + Timeout > lmq_misc:unixtime().
   
   get_timeout(S=#state{}) ->
       case queue:is_empty(S#state.waiting) of
  
positive.code:         true ->
              erlang:demonitor(Ref, [flush]),
              Waiting = queue:filter(
                  fun({_, _, V}) when V =:= Ref -> false;
                     (_) -> true
                  end, S#state.waiting),
              S#state{waiting=Waiting, monitors=gb_sets:delete(Ref, M)};
  
negative.code: 
  -include("lmq.hrl").
  -record(state, {name, props, waiting=queue:new(), monitors=gb_sets:empty()}).
  -record(waiting, {from, ref, timeout, start_time=lmq_misc:unixtime()}).
  
  start(Name) ->
      supervisor:start_child(lmq_queue_sup, [Name]).
  