richterger / Perl-LanguageServer

Language Server for Perl
Other
224 stars 51 forks source link

Non-blocking Read on Windows #198

Open gflohr opened 11 months ago

gflohr commented 11 months ago

In the "Known Issues" section of the docs, you mention that the extension does not work on Windows because you could not find a way to do non-blocking reads from stdin on that platform.

I had faced a similar problem for Qgoda, where I had to asynchronously read from multiple child processes and the file system polling API in parallel. After a lot of try-and-error, I finally found a comparably simple solution that is described here: http://www.guido-flohr.net/platform-independent-asynchronous-child-process-ipc/

See also:

richterger commented 10 months ago

Thanks very much for sharing this. I remember this way to talk to child processes from my time when did C programming for windows, but as far as I see it does not solve the problem, that the language server itself needs to read from stdin in a non blocking way to get it's commands from vscode. I know there are ways to do it in C code, but actually I do no Perl programming on windows anymore, so because of my limited time I am not able to do further investigation in this direction and as you said it takes a lot of time to figure this out. So I am happy to include any patches, but will not yet do it on my own.