Skip to content

Commit 2629d4e

Browse files
committed
Replace deprecated boost:process:child:wait_for
1 parent 074bea7 commit 2629d4e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/common/SubTimeFrameFileSource.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,9 @@ void SubTimeFrameFileSource::DataFetcherThread()
371371
bp::child lCopyChild(bp::search_path("sh"), lCopyParams, bp::std_err > mCopyCmdLogFile,
372372
bp::std_out > mCopyCmdLogFile);
373373

374-
while (!lCopyChild.wait_for(5s)) {
374+
// Report progress every 5 seconds
375+
for (auto lCopyChildFuture = std::async(std::launch::async, [&]() { lCopyChild.wait(); });
376+
std::future_status::timeout == lCopyChildFuture.wait_for(5s); ) {
375377
IDDLOG("(Sub)TimeFrame source: waiting for copy command. cmd='{}'", lRealCmd);
376378
}
377379

0 commit comments

Comments
 (0)