@Override
    public void invocationFinished() {
      myObsolete.set(true);
      if (myTask.isDone() && myAllResumed.get()) {
        // suspend all threads but the current one (which should be suspended already)
        myThread.getVirtualMachine().suspend();
        LOG.warn("Long invocation on " + myThread + " has been finished");
        myThreadBlockedMonitor.myInvocationWatching = null;
        myThread.resumeImpl();
        Set<ThreadReferenceProxyImpl> resumedThreads = mySuspendAllContext.myResumedThreads;
        if (resumedThreads != null) {
          for (ThreadReferenceProxyImpl thread : resumedThreads) {
            thread.resumeImpl();
          }
        }
        if (myDiagnosticsTask != null) {
          myDiagnosticsTask.cancel(false);
        }
      }
      else {
        myTask.cancel(true);
      }
    }
@Override
    public void invocationFinished()