Removes all watchers from the `poet` instance so previously registered
callbacks are not called again
498630
function unwatch (poet) {
  poet.watchers.forEach(function (watcher) {
    watcher.watcher.close();
  });
  poet.futures.forEach(function (future) {
    clearTimeout(future);
  });
  poet.watchers = [];
  poet.futures = [];
  return poet;
}
1002472
def removeObserver(self, observer):
        
        with self._lock:
            self._weak_observers.remove(weakref.ref(observer))
            if len(self._weak_observers) == 0:
                self.stopThread()
561623
def stop(self):
        
        self.observer_thread.stop()
        self.observer_thread.join()
        logging.info("Configfile watcher plugin: Stopped")
862036
def off(self, events, callback):
        
        if isinstance(events, (str, unicode)):
            events = [events]
        for event in events:
            for callback_obj in self._on_off_events[event]:
                if callback_obj['callback'] == callback:
                    try:
                        del self._on_off_events[event]
                    except KeyError:
                        pass
827899
function _cleanObserver(observer) {
        if (!attachedNotifierCountMap.get(observer) && !pendingChangesMap.has(observer)) {
            attachedNotifierCountMap.delete(observer);
            var index = observerCallbacks.indexOf(observer);
            if (index !== -1) {
                observerCallbacks.splice(index, 1);
            }
        }
    }
496395
function() {

		for (var name in this._events_listeners) {

			if (this._events_listeners[name]) {

				Lava.Core.removeGlobalHandler(this._events_listeners[name]);
				this._events_listeners[name] = null;
				this._event_usage_counters[name] = 0;

			}

		}

	}
558755
def remove_callback(self, callback):
        """"""
        if callback in self._async_callbacks:
            self._async_callbacks.remove(callback)
199362
function() {

		if (this._binds) {

			for (var i = 0, count = this._binds.length; i < count; i++) {
				this._binds[i].removeListener(this._bind_changed_listeners[i]);
			}

			this._binds = this._bind_changed_listeners = null;

		}

		this._argument.removeListener(this._argument_changed_listener);
		this._observable_listener && this._flushObservable();

		if (this._own_collection) {

			this._value.destroy();

		}

		this.suspendRefreshable();

	}
695567
def _remove_session_callback(self, callback_obj, originator):
        ''' 

        '''
        try:
            callback_objs = [callback_obj]
            self._session_callbacks.remove(callback_obj)
            for cb, cb_objs in list(self._callback_objs_by_callable[originator].items()):
                try:
                    cb_objs.remove(callback_obj)
                    if not cb_objs:
                        del self._callback_objs_by_callable[originator][cb]
                except KeyError:
                    pass
        except KeyError:
            raise ValueError("callback already ran or was already removed, cannot be removed again")
        # emit event so the session is notified and can remove the callback
        for callback_obj in callback_objs:
            self._trigger_on_change(SessionCallbackRemoved(self, callback_obj))
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
447672
function() {
      workers = [];
      netBinding = process.binding('net');
      if (server_socket) {
        netBinding.close(server_socket);
      }
      if (the_server) {
        the_server.watcher.stop();
        the_server = null;
      }
      server_socket = null;
      if (master_server) {
        master_server.close();
      }
      if (master_socket_path) {
        // try to remove the
        try {
          require('fs').unlinkSync(master_socket_path);
        } catch(excp) {
          // do nothing
        }
        master_socket_path = null;
      }
      master_server = null;
      process.removeListener('SIGINT', killer);
      process.removeListener('SIGHUP', killer);
      process.removeListener('SIGTERM', killer);
      process.removeListener('SIGUSR2', respawner); 
      
      try {
        process.stdout.end();
      } catch(exxcpe) {
        // do nothing
      }
    }
128052
function deleteSelf(callback) {
  var _this = this;

  _flowsync2["default"].series([function (done) {
    _this.beforeDelete(done);
  }, function (done) {
    if (_this.constructor.useSoftDelete !== undefined) {
      _this.softDestroy(done);
    } else {
      _this.destroy(done);
    }
  }, function (done) {
    _this.afterDelete(done);
  }], function (errors) {
    callback(errors);
  });
}
1035885
def remove_all_observers(self):
        
        for weak_observer in self._weak_observers:
            observer = weak_observer()
            if observer:
                self.remove_observer(observer)
5943
def forget(self):
        
        self._observed_events = {}
        if self in self._observers:
            self._observers.remove(self)
432068
def stop_watching(self):
        
        self._watch = False

        if self._observer:
            self._logger.info('Stopping watcher')
            self._observer.stop()
            self._logger.info('Watcher stopped')
1298793
def remove_all_callbacks(self):
        
        for cb_id in list(self._next_tick_callback_removers.keys()):
            self.remove_next_tick_callback(cb_id)
        for cb_id in list(self._timeout_callback_removers.keys()):
            self.remove_timeout_callback(cb_id)
        for cb_id in list(self._periodic_callback_removers.keys()):
            self.remove_periodic_callback(cb_id)
1267276
def removeCallback(cls, eventType, func, record=None):
        
        callbacks = cls.callbacks()
        callbacks.setdefault(eventType, [])
        for i in xrange(len(callbacks[eventType])):
            my_func, my_record, _ = callbacks[eventType][i]
            if func == my_func and record == my_record:
                del callbacks[eventType][i]
                break