Runnable with both Python3 and Python2, with both PyQt5 and PyQt4 by using Qt.py #2250
|
@ -14,6 +14,7 @@ There are also other threads in the `.network` package.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
|
import six
|
||||||
|
|
||||||
from class_addressGenerator import addressGenerator
|
from class_addressGenerator import addressGenerator
|
||||||
from class_objectProcessor import objectProcessor
|
from class_objectProcessor import objectProcessor
|
||||||
|
@ -32,6 +33,7 @@ else:
|
||||||
"""Set the thread name for external use (visible from the OS)."""
|
"""Set the thread name for external use (visible from the OS)."""
|
||||||
prctl.set_name(name)
|
prctl.set_name(name)
|
||||||
|
|
||||||
|
if six.PY2:
|
||||||
def _thread_name_hack(self):
|
def _thread_name_hack(self):
|
||||||
set_thread_name(self.name)
|
set_thread_name(self.name)
|
||||||
threading.Thread.__bootstrap_original__(self)
|
threading.Thread.__bootstrap_original__(self)
|
||||||
|
|
Reference in New Issue
Block a user