File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
python_packages/jupyter_lsp/jupyter_lsp Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,9 @@ class LanguageServerSessionBase(
86
86
help = "timeout in seconds after which a process will be terminated forcefully" ,
87
87
).tag (config = True )
88
88
queue_size = Float (
89
- math .inf ,
90
- help = "the maximum number of messages that can be buffered in the queue"
89
+ - 1 ,
90
+ help = "the maximum number of messages that can be buffered in the queue or -1 "
91
+ "for an unbounded queue"
91
92
).tag (config = True )
92
93
93
94
_skip_serialize = ["argv" , "debug_argv" ]
@@ -257,10 +258,11 @@ async def stop_process(self, timeout: int = 5):
257
258
258
259
def init_queues (self ):
259
260
"""create the queues"""
261
+ queue_size = math .inf if self .queue_size < 0 else self .queue_size
260
262
self .from_lsp = StapledObjectStream (
261
- * anyio .create_memory_object_stream (max_buffer_size = self . queue_size ))
263
+ * anyio .create_memory_object_stream (max_buffer_size = queue_size ))
262
264
self .to_lsp = StapledObjectStream (
263
- * anyio .create_memory_object_stream (max_buffer_size = self . queue_size ))
265
+ * anyio .create_memory_object_stream (max_buffer_size = queue_size ))
264
266
265
267
def substitute_env (self , env , base ):
266
268
final_env = copy (os .environ )
You can’t perform that action at this time.
0 commit comments