anchor.diff:      %% Send message to "unblock" the process.
       continue(Lid),
       %% Dispatch incoming notifications to the appropriate handler.
  -    dispatch(Context#context{state = NewState}).
  +    NewContext = dispatch(Context#context{state = NewState}),
  +    %% Update context due to wakeups caused by the last action.
  +    ?SETS:fold(fun check_wakeup/2, NewContext, NewContext#context.blocked).
  +
  +check_wakeup(Lid, #context{active = Active, blocked = Blocked} = Context) ->
  +    continue(Lid),
  +    receive
  +		#special{msg = wakeup} ->
  +			NewBlocked = ?SETS:del_element(Lid, Blocked),
  +			NewActive = ?SETS:add_element(Lid, Active),
  +			Context#context{active = NewActive, blocked = NewBlocked};
  +		#special{msg = no_wakeup} -> Context
  +    end.
   
   %% Delegate notifications sent by instrumented client code to the appropriate
   %% handlers.
   dispatch(Context) ->
       receive
  -	#sched{msg = Type, lid = Lid, misc = Misc} ->
  -	    handler(Type, Lid, Context, Misc);
  -	%% Ignore unknown processes.
  -	{'EXIT', Pid, Reason} ->
  -	    case lid:from_pid(Pid) of
  -		not_found -> dispatch(Context);
  -		Lid -> handler(exit, Lid, Context, Reason)
  -	    end
  +		#sched{msg = Type, lid = Lid, misc = Misc} ->
  +			handler(Type, Lid, Context, Misc);
  +		%% Ignore unknown processes.
  +		{'EXIT', Pid, Reason} ->
  +			case lid:from_pid(Pid) of
  +				not_found -> dispatch(Context);
  +				Lid -> handler(exit, Lid, Context, Reason)
  +			end
       end.
   
   %%%----------------------------------------------------------------------
  
positive.code: 
  %% FIXME: Refactor this (it's almost the same as 'spawn')
  handler(spawn_monitor, ParentLid,
  	#context{active = Active, details = Det} = Context, {ChildPid, _Ref}) ->
      link(ChildPid),
      ChildLid = lid:new(ChildPid, ParentLid),
      log_details(Det, {spawn_monitor, ParentLid, ChildLid}),
  
negative.code: log_details(Det, Action) ->
      ?debug_1(proc_action:to_string(Action) ++ "~n"),
      case Det of
  		true -> replay_logger:log(Action);
  		false -> continue
      end.
  
  %% Remove and return a state.
  %% If no states available, return 'no_state'.
  state_load() ->
      case ets:first(?NT_STATE1) of
  		'$end_of_table' -> no_state;
  		State ->
  			ets:delete(?NT_STATE1, State),
  			State
      end.
  
  %% Return a state without removing it.
  %% If no states available, return 'no_state'.
  state_peak() ->
      case ets:first(?NT_STATE1) of
  		'$end_of_table' ->  no_state;
  		State -> State
      end.
  
  %% Add a state to the current `state` table.
  