Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 4
0
 def run():
     pthread.setname(HELPER_NAME)
     ready.set()
     done.wait()
Esempio n. 5
0
 def run():
     pthread.setname(NAME)
     names[0] = pthread.getname()
Esempio n. 6
0
 def run():
     pthread.setname(HELPER_NAME)
     ready.set()
     done.wait()
Esempio n. 7
0
 def run():
     pthread.setname(NAME)
     names[0] = pthread.getname()