Example #1
0
 def run():
     thread = threading.current_thread()
     try:
         log.debug("START thread %s (func=%s, args=%s, kwargs=%s)", thread,
                   func, args, kwargs)
         pthread.setname(thread.name[:15])
         ret = func(*args, **kwargs)
         log.debug("FINISH thread %s", thread)
         return ret
     except Exception:
         log.exception("FINISH thread %s failed", thread)
Example #2
0
 def run():
     thread = threading.current_thread()
     try:
         log.debug("START thread %s (func=%s, args=%s, kwargs=%s)", thread,
                   func, args, kwargs)
         pthread.setname(thread.name[:15])
         ret = func(*args, **kwargs)
         log.debug("FINISH thread %s", thread)
         return ret
     except (SystemExit, KeyboardInterrupt) as e:
         # Unlikley, but not interesting.
         log.debug("FINISH thread %s (%s)", thread, e)
     except:
         log.exception("FINISH thread %s failed", thread)
Example #3
0
 def run():
     thread = threading.current_thread()
     try:
         log.debug("START thread %s (func=%s, args=%s, kwargs=%s)",
                   thread, func, args, kwargs)
         pthread.setname(thread.name[:15])
         ret = func(*args, **kwargs)
         log.debug("FINISH thread %s", thread)
         return ret
     except (SystemExit, KeyboardInterrupt) as e:
         # Unlikley, but not interesting.
         log.debug("FINISH thread %s (%s)", thread, e)
     except:
         log.exception("FINISH thread %s failed", thread)
Example #4
0
 def run():
     pthread.setname(HELPER_NAME)
     ready.set()
     done.wait()
Example #5
0
 def run():
     pthread.setname(NAME)
     names[0] = pthread.getname()
Example #6
0
 def run():
     pthread.setname(HELPER_NAME)
     ready.set()
     done.wait()
Example #7
0
 def run():
     pthread.setname(NAME)
     names[0] = pthread.getname()