File tree Expand file tree Collapse file tree 2 files changed +28
-24
lines changed Expand file tree Collapse file tree 2 files changed +28
-24
lines changed Original file line number Diff line number Diff line change 87
87
"module" : " robotcode.debugger" ,
88
88
"justMyCode" : false ,
89
89
"args" : [
90
- " -p" , " 6612" ,
90
+ " -p" ,
91
+ " 6612" ,
91
92
" -w" ,
92
93
" --" ,
93
- " -d" , " results" ,
94
- " -P" , " ./lib" ,
95
- " -P" , " ./resources" ,
94
+ " -d" ,
95
+ " results" ,
96
+ " -P" ,
97
+ " ./lib" ,
98
+ " -P" ,
99
+ " ./resources" ,
96
100
//"C:\\tmp\\robottest\\tests\\bdd_style.robot"
97
101
" ."
98
102
]
119
123
"justMyCode" : false ,
120
124
"args" : [
121
125
" --mode" ,
122
- " stdio" ,
123
- " --call-tracing" ,
124
- " --log-config" ,
125
- " log.ini"
126
- //"--debug",
127
- // "--debug-json-rpc",
128
- // "--debug-json-rpc-data",
129
- //"--debug-colored"
126
+ " stdio"
130
127
]
131
128
},
132
129
{
162
159
"args" : [
163
160
" --mode" ,
164
161
" stdio" ,
162
+ " --log" ,
163
+ " --log-level" ,
164
+ " TRACE" ,
165
165
" --call-tracing" ,
166
- " --log-config" ,
167
- " log.ini"
168
- //"--debug",
169
- // "--debug-json-rpc",
170
- // "--debug-json-rpc-data",
171
- //"--debug-colored"
166
+ " --log-json-rpc" ,
167
+ " --log-json-rpc-data" ,
168
+ " --log-language-server" ,
169
+ " --log-language-server-parts" ,
170
+ " --log-robotframework" ,
171
+ " --log-asyncio" ,
172
+ " --debug-asyncio"
172
173
]
173
174
},
174
175
{
Original file line number Diff line number Diff line change @@ -183,15 +183,18 @@ def run_io_nonblocking() -> None:
183
183
184
184
async def aio_readline (rfile : BinaryIO , protocol : asyncio .Protocol ) -> None :
185
185
protocol .connection_made (transport )
186
- stdio_executor = ThreadPoolExecutor ( max_workers = 1 , thread_name_prefix = "aio_readline" )
187
- with stdio_executor :
186
+
187
+ def run () -> None :
188
188
while (
189
189
self ._stdio_stop_event is not None and not self ._stdio_stop_event .is_set () and not rfile .closed
190
190
):
191
- data = await self .loop .run_in_executor (
192
- stdio_executor , cast (io .BufferedReader , rfile ).read1 , 1000
193
- )
194
- protocol .data_received (data )
191
+ if cast (io .BufferedReader , rfile ).peek (1 ):
192
+ data = cast (io .BufferedReader , rfile ).read1 (10000 )
193
+
194
+ self .loop .call_soon_threadsafe (protocol .data_received , data )
195
+
196
+ with ThreadPoolExecutor (max_workers = 1 , thread_name_prefix = "aio_readline" ) as stdio_executor :
197
+ await asyncio .wrap_future (stdio_executor .submit (run ))
195
198
196
199
self .loop .run_until_complete (aio_readline (transport .rfile , protocol ))
197
200
You can’t perform that action at this time.
0 commit comments