Fix test.

This commit is contained in:
Nikolai Kochetov 2021-10-20 13:46:42 +03:00
parent 171a6e35ce
commit 3c0451981b

View File

@ -89,7 +89,11 @@ void ExecutorTasks::tryGetTask(ExecutionThreadContext & context)
/// If we execute in single thread, wait for async tasks here.
auto res = async_task_queue.wait(lock);
if (!res)
{
if (finished)
return;
throw Exception("Empty task was returned from async task queue", ErrorCodes::LOGICAL_ERROR);
}
context.setTask(static_cast<ExecutingGraph::Node *>(res.data));
return;