comparison mercurial/statprof.py @ 43509:5c9daf7df2b4

statprof: correctly always pass a str as the thread name Caught by pytype. Differential Revision: https://phab.mercurial-scm.org/D7259
author Augie Fackler <augie@google.com>
date Wed, 06 Nov 2019 14:19:05 -0500
parents d783f945a701
children 313e3a279828
comparison
equal deleted inserted replaced
43508:ab9b0a20b9e6 43509:5c9daf7df2b4
350 ) 350 )
351 elif mechanism == b'thread': 351 elif mechanism == b'thread':
352 frame = inspect.currentframe() 352 frame = inspect.currentframe()
353 tid = [k for k, f in sys._current_frames().items() if f == frame][0] 353 tid = [k for k, f in sys._current_frames().items() if f == frame][0]
354 state.thread = threading.Thread( 354 state.thread = threading.Thread(
355 target=samplerthread, args=(tid,), name=b"samplerthread" 355 target=samplerthread, args=(tid,), name="samplerthread"
356 ) 356 )
357 state.thread.start() 357 state.thread.start()
358 358
359 359
360 def stop(): 360 def stop():