anchor.diff:  
   function TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.GetCurrentState : TState;
   begin
  -  Lock;
  +  InternalLock;
     try
       Result := FFiniteStateMachine.CurrentState;
     finally
  -    Unlock;
  +    InternalUnlock;
     end;
   end;
   
   function TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.GetPreviousState : TState;
   begin
  -  Lock;
  +  InternalLock;
     try
       Result := FFiniteStateMachine.PreviousState;
     finally
  -    Unlock;
  +    InternalUnlock;
     end;
   end;
   
   function TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.GetReachableState(const FromState : TState;
     const OnCommand : TCommand) : TState;
   begin
  -  Lock;
  +  InternalLock;
     try
       Result := FFiniteStateMachine.GetReachableState(FromState, OnCommand);
     finally
  -    Unlock;
  +    InternalUnlock;
     end;
   end;
   
   function TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.GetReachableState(const OnCommand : TCommand) : TState;
   begin
  -  Lock;
  +  InternalLock;
     try
       Result := FFiniteStateMachine.GetReachableState(OnCommand);
     finally
  -    Unlock;
  +    InternalUnlock;
     end;
   end;
   
   function TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.HasTransition(const OnCommand : TCommand) : Boolean;
   begin
  -  Lock;
  +  InternalLock;
     try
       Result := FFiniteStateMachine.HasTransition(OnCommand);
     finally
  -    Unlock;
  -  end;
  +    InternalUnlock;
  +  end;
  +end;
  +
  +procedure TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.InternalLock;
  +begin
  +  TMonitor.Enter(FLock);
  +end;
  +
  +procedure TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.InternalUnlock;
  +begin
  +  TMonitor.Exit(FLock);
  +end;
  +
  +function TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.Lock : IFiniteStateMachine;
  +begin
  +  InternalLock;
  +  Result := FFiniteStateMachine;
   end;
   
   function TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.HasTransition(const FromState : TState;
     const OnCommand : TCommand) : Boolean;
   begin
  -  Lock;
  +  InternalLock;
     try
       Result := FFiniteStateMachine.HasTransition(FromState, OnCommand);
     finally
  -    Unlock;
  -  end;
  -end;
  -
  -procedure TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.Lock;
  -begin
  -  TMonitor.Enter(FLock);
  +    InternalUnlock;
  +  end;
   end;
   
   function TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.RemoveAllTransitions : IFiniteStateMachine;
   begin
  -  Lock;
  +  InternalLock;
     try
       FFiniteStateMachine.RemoveAllTransitions;
     finally
  -    Unlock;
  +    InternalUnlock;
     end;
   
     Result := Self;
  
positive.code: function TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.RemoveTransition(const FromState : TState;
    const OnCommand : TCommand) : IFiniteStateMachine;
  begin
    Lock;
    try
      FFiniteStateMachine.RemoveTransition(FromState, OnCommand);
    finally
      Unlock;
    end;
  
    Result := Self;
  
negative.code: function TThreadFiniteStateMachine<TState, TCommand, ErrorClass>.AddTransition(const FromState, ToState : TState;
    const OnCommand : TCommand; const OnEnter : TOnEnterStateProc; const OnExit : TOnExitStateProc) : IFiniteStateMachine;
  begin
    InternalLock;
    try
      FFiniteStateMachine.AddTransition(FromState, ToState, OnCommand, OnEnter, OnExit);
    finally
      InternalUnlock;
    end;
  
    Result := Self;
  