Skip to content

Commit 3d30bf5

Browse files
Kevin Wilfongfacebook-github-bot
Kevin Wilfong
authored andcommitted
Wait for task completion future in cursor (facebookincubator#9225)
Summary: Pull Request resolved: facebookincubator#9225 Wait for the taskCompletionFuture in MultiTaskCursor's moveNext() method, currently we just fetch it. (This was my bad, I thought it waited like waitForTaskDriversToFinish, but it just returns the future as the name suggests) Reviewed By: xiaoxmeng Differential Revision: D55261345 fbshipit-source-id: 540781ddec6608f1717991cb29f44c538f160439
1 parent 458339f commit 3d30bf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

velox/exec/tests/utils/Cursor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class MultiThreadedTaskCursor : public TaskCursorBase {
277277
if (task_->error()) {
278278
// Wait for the task to finish (there's' a small period of time between
279279
// when the error is set on the Task and terminate is called).
280-
task_->taskCompletionFuture(1'000'000);
280+
task_->taskCompletionFuture(1'000'000).wait();
281281

282282
// Wait for all task drivers to finish to avoid destroying the executor_
283283
// before task_ finished using it and causing a crash.

0 commit comments

Comments
 (0)