def __call__(self, *args, **kwargs): new_args = get_host()._dumps(list(args)) result = self.__send(self.__name, new_args, kwargs) if result != None: return get_host()._loads(result) else: return result
def __call__(self, *args, **kwargs): new_args = get_host()._dumps(list(args)) result = self.__send(self.__name, new_args, kwargs) if result != None: return {k: get_host()._loads(v) for k, v in result.items()} # return get_host()._loads(result.values) else: return result
def launch(func, params=[]): t1 = Thread(target=func, args=params) threads[t1] = 'atom://localhost/'+func.__module__+'/'+func.__name__ t1.start() t1.join() host = controller.get_host() host._shutdown()
def launch(func, params=[]): # TODO Mirar que funcione bien el tema de matar todos los threads t1 = Thread(target=func, args=params) threads[t1] = "atom://localhost/" + func.__module__ + "/" + func.__name__ t1.start() t1.join() host = controller.get_host() host._shutdown()
def launch(func, params=[]): #TODO Mirar que funcione bien el tema de matar todos los threads t1 = Thread(target=func, args=params) threads[t1] = 'atom://localhost/' + func.__module__ + '/' + func.__name__ t1.start() t1.join() host = controller.get_host() host._shutdown()
def attach(self, actor): dumps_actor = get_host()._dumps(actor) actor = get_host()._loads(dumps_actor) self.dict_actors[actor.get_aref()] = actor
def signal_handler(signal, frame): print 'You pressed Ctrl+C!' host = controller.get_host() host.shutdown() sys.exit(0)