void (SuspendContextImpl suspendContext) { boolean paused = hasPausedContext(suspendContext); popContext(suspendContext); suspendContext.resume(false); // just set resumed flag for correct commands cancellation SuspendContextImpl newSuspendContext = pushSuspendContext(suspendContext.getSuspendPolicy(), 0); newSuspendContext.setThread(suspendContext.getThread().getThreadReference()); notifyPaused(newSuspendContext, paused); }