예제 #1
0
파일: subthread.py 프로젝트: creuzige/OOF2
 def getMiniThread(self):
     callers_ts = threadstate.findThreadState()
     if callers_ts:
         self.lock.acquire()
         try:
             for mini in self.listofminithreads:
                 if mini.threadstate == callers_ts:
                     return mini
         finally:
             self.lock.release()
예제 #2
0
 def getMiniThread(self):
     callers_ts = threadstate.findThreadState()
     if callers_ts:
         self.lock.acquire()
         try:
             for mini in self.listofminithreads:
                 if mini.threadstate == callers_ts:
                     return mini
         finally:
             self.lock.release()
예제 #3
0
파일: clerk.py 프로젝트: santiama/OOF3D
 def run(self):
     print os.getpid()
     ## startTime = time.time()
     try:
         try:
             self.threadstate = threadstate.findThreadState()
             self.function(*self.args, **self.kwargs)
             return
         except Exception, exception:
             print exception
             sys.stdout.flush()
     finally:
         self.threadstate.make_defunct()