Skip to content

Commit

Permalink
Fix calling get on the future
Browse files Browse the repository at this point in the history
  • Loading branch information
dagardner-nv committed Aug 16, 2024
1 parent ac1c28d commit e865253
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions python/mrc/_pymrc/src/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,17 @@ class PyIteratorIterator
while (subscriber.is_subscribed() && future_status != std::future_status::ready)
{
future_status = future.wait_for(std::chrono::milliseconds(100));
if (future_status == std::future_status::ready)
{
future.get();
}
else

if (future_status != std::future_status::ready)
{
std::this_thread::yield();
}
}

if (future_status == std::future_status::ready)
{
future.get();
}
}

private:
Expand Down

0 comments on commit e865253

Please sign in to comment.