add docstring for set_thread methrod in helper_msgcoding
This commit is contained in:
parent
e6e4c66010
commit
5efb491349
|
@ -7,6 +7,7 @@ try:
|
||||||
import prctl
|
import prctl
|
||||||
|
|
||||||
def set_thread_name(name):
|
def set_thread_name(name):
|
||||||
|
"""Set a name for the thread for python internal use."""
|
||||||
prctl.set_name(name)
|
prctl.set_name(name)
|
||||||
|
|
||||||
def _thread_name_hack(self):
|
def _thread_name_hack(self):
|
||||||
|
@ -17,6 +18,7 @@ try:
|
||||||
threading.Thread._Thread__bootstrap = _thread_name_hack
|
threading.Thread._Thread__bootstrap = _thread_name_hack
|
||||||
except ImportError:
|
except ImportError:
|
||||||
def set_thread_name(name):
|
def set_thread_name(name):
|
||||||
|
"""Set the thread name for external use (visible from the OS)."""
|
||||||
threading.current_thread().name = name
|
threading.current_thread().name = name
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user