@Override
    public void execute(FunctionContext<Object> context) {
      stuckThread = Thread.currentThread();
      try {
        LOCK.tryLock(5, TimeUnit.MINUTES);
        LOCK.unlock();
      } catch (InterruptedException e) {
        if (LOCK.isHeldByCurrentThread()) {
          LOCK.unlock();
        }
      } finally {
        context.getResultSender().lastResult(null);
      }
    }
Distributed test base for show deadlock command in {@link ShowDeadlockCommand}.
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDistributedTestBase.java