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