Fix deprecated threading.getName()
threading.getName() is deprecated as for Python 3.10. Use name attribute "threading.name" instead. https://stackoverflow.com/a/69656065 https://stackoverflow.com/a/69656065
This commit is contained in:
parent
9811ac51aa
commit
c9bfdf391f
@ -237,11 +237,11 @@ def start_thread(func, *a, **k):
|
|||||||
""" run function in a new thread
|
""" run function in a new thread
|
||||||
"""
|
"""
|
||||||
th = threading.Thread(target=func, args=a, kwargs=k, daemon=True)
|
th = threading.Thread(target=func, args=a, kwargs=k, daemon=True)
|
||||||
th_name = th.getName()
|
th_name = th.name
|
||||||
|
|
||||||
if debug_threading:
|
if debug_threading:
|
||||||
log('Starting {} from {}'.format(
|
log('Starting {} from {}'.format(
|
||||||
th_name, threading.current_thread().getName()
|
th_name, threading.current_thread().name
|
||||||
))
|
))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user