Пример #1
0
	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()
Пример #2
0
 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)
Пример #3
0
 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
Пример #4
0
	def cancel(self):
		unregister_worker(self)
		self.parent._stop()
		self.channel.close()
Пример #5
0
	def drop_worker(self,worker):
		unregister_worker(worker)
		self.workers.remove(worker)
Пример #6
0
 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)