def activate(self, Scheduler=None, Tracker=None, mainmethod="main"): self._threadId = numId() self._localThreadId = threading.currentThread().getName() self._threadmainmethod = self.__getattribute__(mainmethod) self._thethread = threading.Thread(name=self._threadId, target=self._threadmain) self._thethread.setDaemon(True) # means the thread is stopped if the main thread stops. return super(threadedcomponent,self).activate(Scheduler,Tracker,"_localmain")
def activate(self, Scheduler=None, Tracker=None, mainmethod="main"): self._threadId = numId() self._localThreadId = threading.currentThread().getName() self._threadmainmethod = self.__getattribute__(mainmethod) self._thethread = threading.Thread(name=self._threadId, target=self._threadmain) self._thethread.setDaemon( True) # means the thread is stopped if the main thread stops. return super(threadedcomponent, self).activate(Scheduler, Tracker, "_localmain")
def activate(self, Scheduler=None, Tracker=None, mainmethod="main"): """\ Call to activate this microprocess, so it can start to be executed by a scheduler. Usual usage is to simply call x.activate(). See Axon.Microprocess.microprocess.activate() for more info. """ self._threadId = numId() self._localThreadId = threading.currentThread().getName() self._threadmainmethod = self.__getattribute__(mainmethod) self._thethread = threading.Thread(name=self._threadId, target=self._threadmain) self._thethread.setDaemon(True) # means the thread is stopped if the main thread stops. return super(threadedcomponent,self).activate(Scheduler,Tracker,"_localmain")