code: Set<ProbeListener> removeListenersForMonitor(Object monitor) {
          Set<ProbeListener> listeners = null;
  
          listenersLock.writeLock().lock();
          try {
              listeners = listenersForMonitor.remove(monitor);
              if (listeners == null) {
                  listeners = Collections.emptySet();
              } else {
                  allRegisteredListeners.removeAll(listeners);
              }
          } finally {
              listenersLock.writeLock().unlock();
          }
  
          return listeners;
      }
docs: Remove the listeners associated with the specified monitor from the set
  of registered listeners.
  
  @param monitor the monitor that owns the listeners
  
  @return the set of listeners that were associated with the monitor