Process Async IO.

Windows fixes.
This commit is contained in:
Martín Lucas Golini
2023-02-12 02:20:44 -03:00
parent 7c47a26f02
commit bc2b411875
5 changed files with 111 additions and 19 deletions

View File

@@ -947,7 +947,8 @@ bool LSPClientServer::start() {
mLSP.commandParameters = " " + mLSP.commandParameters;
cmd += mLSP.commandParameters;
}
bool ret = mProcess.create( cmd, Process::getDefaultOptions(), {}, mRootPath );
bool ret =
mProcess.create( cmd, Process::getDefaultOptions() | Process::EnableAsync, {}, mRootPath );
if ( ret && mProcess.isAlive() ) {
mProcess.startAsyncRead(
[this]( const char* bytes, size_t n ) { readStdOut( bytes, n ); },