@Override
  public void removeMember(DistributedMember member, boolean crashed) {
    lifecycleLock.lock();
    try {
      Runnable task = new RemoveMemberTask(member, crashed);
      if (starting) {
        pendingTasks.add(task);
      } else if (running) {
        executeTask(task);
      }
    } finally {
      lifecycleLock.unlock();
    }
  }
This method will delegate task to another thread and exit, so that it wont block the membership
listener
geode-core/src/main/java/org/apache/geode/management/internal/FederatingManager.java