Skip to content

Commit 2da574d

Browse files
committed
Name the threads IOPub and Heartbeat for easier debugging
1 parent f03f443 commit 2da574d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ipykernel/heartbeat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Heartbeat(Thread):
3232
def __init__(self, context, addr=None):
3333
if addr is None:
3434
addr = ('tcp', localhost(), 0)
35-
Thread.__init__(self)
35+
Thread.__init__(self, name="Heartbeat")
3636
self.context = context
3737
self.transport, self.ip, self.port = addr
3838
self.original_port = self.port

ipykernel/iostream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(self, socket, pipe=False):
6969
self._local = threading.local()
7070
self._events = deque()
7171
self._setup_event_pipe()
72-
self.thread = threading.Thread(target=self._thread_main)
72+
self.thread = threading.Thread(target=self._thread_main, name="IOPub")
7373
self.thread.daemon = True
7474

7575
def _thread_main(self):

0 commit comments

Comments
 (0)