Skip to content

Commit 862721b

Browse files
committed
thread name
1 parent 7a8c855 commit 862721b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hkube_python_wrapper/communication/streaming/StreamingListener.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import threading
22
import time
3+
import uuid
4+
35
from hkube_python_wrapper.util.DaemonThread import DaemonThread
46

57
class StreamingListener(DaemonThread):
@@ -18,7 +20,8 @@ def run(self):
1820
time.sleep(1) # free some cpu
1921
continue
2022
for listener in messageListeners:
21-
listener.thread = threading.Thread(target=self.fetch, args=[listener])
23+
threadName = listener.messageOriginNodeName + "_" + str(uuid.uuid4())
24+
listener.thread = threading.Thread(name=threadName,target=self.fetch, args=[listener])
2225
listener.thread.start()
2326
for listener in messageListeners:
2427
listener.thread.join()

0 commit comments

Comments
 (0)