add docstring for set_thread methrod in helper_msgcoding

This commit is contained in:
Mahendra 2018-04-07 18:42:21 +05:30
parent e6e4c66010
commit 5efb491349
No known key found for this signature in database
GPG Key ID: A672D8FAAEE398B3
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ try:
import prctl
def set_thread_name(name):
"""Set a name for the thread for python internal use."""
prctl.set_name(name)
def _thread_name_hack(self):
@ -17,6 +18,7 @@ try:
threading.Thread._Thread__bootstrap = _thread_name_hack
except ImportError:
def set_thread_name(name):
"""Set the thread name for external use (visible from the OS)."""
threading.current_thread().name = name