Unregisters a whole event (if no handlers are given) or one
        or more handlers from an event.
        Raises EventNotFound when the given event isn't registered.
        Raises HandlerNotFound when a given handler isn't registered.
545732
def off(  # pylint: disable=keyword-arg-before-vararg
            self, event: str = None, *handlers: T.Callable
    ) -> None:
        """"""

        if not event:
            self._events.clear()
            return

        if event not in self._events:
            raise EventNotFound(event)

        if not handlers:
            self._events.pop(event)
            return

        for callback in handlers:
            if callback not in self._events[event]:
                raise HandlerNotFound(event, callback)
            while callback in self._events[event]:
                self._events[event].remove(callback)
        return
360385
def unregister(self, thread):
        
        if thread not in self.threads.keys():
            self.log.warning("Can not unregister thread %s" % thread)
        else:
            del (self.threads[thread])
            self.__log.debug("Thread %s got unregistered" % thread)
92964
def unregister(self, signal):
        
        if signal in self.signals.keys():
            del(self.signals[signal])
            self.__log.debug("Signal %s unregisterd" % signal)
        else:
            self.__log.debug("Signal %s does not exist and could not be unregistered.")
781824
private int unregisterHandles() {
        int cancelledHandles = 0;
        for (;;) {
            AcceptorOperationFuture future = cancelQueue.poll();
            if (future == null) {
                break;
            }

            // close the channels
            for (SocketAddress a : future.getLocalAddresses()) {
                H handle = boundHandles.remove(a);
                
                if (handle == null) {
                    continue;
                }

                try {
                    close(handle);
                    wakeup(); // wake up again to trigger thread death
                } catch (Throwable e) {
                    ExceptionMonitor.getInstance().exceptionCaught(e);
                } finally {
                    cancelledHandles++;
                }
            }

            future.setDone();
        }

        return cancelledHandles;
    }
739384
public void removeHandler() {

        clearShowing();
        if (m_overHandlerRegistration != null) {
            m_overHandlerRegistration.removeHandler();
            m_overHandlerRegistration = null;
        }
        m_target = null;
    }
1003598
public synchronized void unregister(@NonNull EventHandlerWrapper eventHandler) {
        String type = eventHandler.type;
        List<EventHandlerWrapper> handlers = subscribers.get(type);
        if (handlers != null) {
            handlers.remove(eventHandler);
        }
    }
1232349
def unbind(self, handler, argspec):
        
        self.handlers[argspec.key].remove((handler, argspec))
        if not len(self.handlers[argspec.key]):
            del self.handlers[argspec.key]
486617
@MainThread
    private void handleUnRegistration(Object targetObj) {
        if (targetObj == null) {
            throw new NullPointerException("Target cannot be null");
        }

        EventTarget target = null;

        for (Iterator<EventTarget> iterator = targets.iterator(); iterator.hasNext(); ) {
            EventTarget listTarget = iterator.next();
            if (listTarget.targetObj == targetObj) {
                iterator.remove();
                target = listTarget;
                target.targetObj = null;
                break;
            }
        }

        if (target == null) {
            Utils.logE(targetObj, "Was not registered");
        }

        Utils.log(targetObj, "Unregistered");
    }
798637
def UnregisterFlowProcessingHandler(self, timeout=None):
    """"""
    if self.flow_processing_request_handler_thread:
      self.flow_processing_request_handler_stop = True
      self.flow_processing_request_handler_thread.join(timeout)
      if self.flow_processing_request_handler_thread.isAlive():
        raise RuntimeError("Flow processing handler did not join in time.")
      self.flow_processing_request_handler_thread = None
219260
def unregister_listener(self, listener):
        
        listener_id = hashable_identity(listener)
        self._listeners.pop(listener_id, None)
936100
def unbind(self, callback):
        
        handlers = self._handlers
        if handlers:
            filtered_callbacks = [f for f in handlers if f != callback]
            removed_count = len(handlers) - len(filtered_callbacks)
            if removed_count:
                self._handlers = filtered_callbacks
            return removed_count
        return 0
198175
def unhandle(self, handler):
        
        with self._hlock:
            try:
                self._handler_list.remove(handler)
            except ValueError:
                raise ValueError("Handler is not handling this event, so cannot unhandle it.")
        return self
738362
def UnregisterMessageHandler(self, timeout=None):
    """"""
    if self.handler_thread:
      self.handler_stop = True
      self.handler_thread.join(timeout)
      if self.handler_thread.isAlive():
        raise RuntimeError("Message handler thread did not join in time.")
      self.handler_thread = None
236792
def remove_handler(self, name):
        ''' 
        '''
        index = None
        for i, h in enumerate(self.capture_handlers):
            if h['name'] == name:
                index = i

        if index is not None:
            self.capture_handlers[index]['logger'].close()
            del self.capture_handlers[index]
806782
function unbindEvent(element, type, handler) {
    const events = safeEvent(element, type);
    const items = events.get(handler);

    if (!items) {
        return;
    }

    forgetHandler(element, type, handler);

    util.forEach(items, func => {
        if ('removeEventListener' in element) {
            element.removeEventListener(type, func);
        } else if ('detachEvent' in element) {
            element.detachEvent(`on${type}`, func);
        }
    });
}
219101
def deregister(self, event, fn):
        
        if event in self._handler_dict and fn in self._handler_dict[event]:
            self._handler_dict[event].remove(fn)
185635
def unregister_handler(self, handler_or_func):
        
        index = -1
        for i, handler in enumerate(self._direct_handlers):
            if handler is handler_or_func or handler._original_func is handler_or_func:
                index = i
                break
        if index >= 0:
            self._direct_handlers.pop(index)
            self._cached_handlers = None

        elif self.parent_class_hook is not None and self.parent_class_hook.has_handler(handler_or_func):
            self.parent_class_hook.unregister_handler(handler_or_func)
            self._cached_handlers = None

        elif self.instance_class_hook is not None and self.instance_class_hook.has_handler(handler_or_func):
            self.instance_class_hook.unregister_handler(handler_or_func)
            self._cached_handlers = None

        else:
            raise ValueError('{} is not a registered handler of {}'.format(handler_or_func, self))