Skip to content

Commit d376780

Browse files
authored
Avoid shared channel_queues when they are instance based (#848)
1 parent 29179e8 commit d376780

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jupyter_server/gateway/managers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,8 @@ class GatewayKernelClient(AsyncKernelClient):
573573

574574
# flag for whether execute requests should be allowed to call raw_input:
575575
allow_stdin = False
576-
_channels_stopped = False
577-
_channel_queues: Optional[dict] = {}
576+
_channels_stopped: bool
577+
_channel_queues: Optional[dict]
578578
_control_channel: Optional[ChannelQueue]
579579
_hb_channel: Optional[ChannelQueue]
580580
_stdin_channel: Optional[ChannelQueue]
@@ -586,6 +586,8 @@ def __init__(self, **kwargs):
586586
self.kernel_id = kwargs["kernel_id"]
587587
self.channel_socket: Optional[websocket.WebSocket] = None
588588
self.response_router: Optional[Thread] = None
589+
self._channels_stopped = False
590+
self._channel_queues = {}
589591

590592
# --------------------------------------------------------------------------
591593
# Channel management methods

0 commit comments

Comments
 (0)