def on_disconnect(self): simple_event("rpc","disconnect",*self.name) if self.workers is not None: for w in self.workers: unregister_worker(w) self.workers = None super(RPCconn,self).delete()
def __delitem__(self, key): val = self[key] unregister_worker(val) del onHandlers[val.id] onHandlers2[val.parent.arglist].remove(val) if not onHandlers2[val.parent.arglist]: del onHandlers2[val.parent.arglist] super(_OnHandlers, self).__delitem__(val.name)
def pop(self, key): val = self[key] if key else self.keys()[0] unregister_worker(val) del OnHandlers[val.id] try: del OnHandlers2[val.parent.arglist] except KeyError: pass return val
def cancel(self): unregister_worker(self) self.parent._stop() self.channel.close()
def drop_worker(self,worker): unregister_worker(worker) self.workers.remove(worker)
def unload(self): main_words.unregister_statement(FS20receive) main_words.unregister_statement(FS20delreceive) main_words.unregister_statement(FS20transmit) main_words.unregister_statement(FS20deltransmit) unregister_worker(FS20tr_shutdown)