MCPcopy Create free account
hub / github.com/cutechess/cutechess / waitForFinished

Method waitForFinished

projects/lib/src/engineprocess_win.cpp:398–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398bool EngineProcess::waitForFinished(int msecs)
399{
400 if (!m_started)
401 return true;
402
403 DWORD dwWait;
404 if (msecs == -1)
405 dwWait = INFINITE;
406 else
407 dwWait = msecs;
408
409 DWORD ret = WaitForSingleObject(m_processInfo.hProcess, dwWait);
410 if (ret == WAIT_OBJECT_0)
411 {
412 // The blocking ReadFile call in the pipe reader should
413 // return now that the pipes are closed. But if it doesn't
414 // happen, the pipe reader will be terminated violently
415 // after the timeout.
416 m_reader->wait(10000);
417 onFinished();
418
419 return true;
420 }
421 return false;
422}
423
424bool EngineProcess::waitForStarted(int msecs)
425{

Callers 2

setEntriesMethod · 0.80
setFilterMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected