diff --git a/corobase.cc b/corobase.cc index fbe7ed6e..141a4343 100644 --- a/corobase.cc +++ b/corobase.cc @@ -172,25 +172,6 @@ void ConcurrentMasstreeIndex::simple_coro_MultiGet( MM::epoch_exit(0, e); } -void ConcurrentMasstreeIndex::simple_coro_MultiOps(std::vector &rcs, - std::vector::promise_type>> &handles) { - int finished = 0; - while (finished < handles.size()) { - for (int i = 0; i < handles.size(); ++i) { - if (handles[i]) { - if (handles[i].done()) { - ++finished; - rcs[i] = handles[i].promise().get_return_value(); - handles[i].destroy(); - handles[i] = nullptr; - } else { - handles[i].resume(); - } - } - } - } -} - ermia::coro::generator ConcurrentMasstreeIndex::coro_GetRecordSV(transaction *t, const varstr &key, varstr &value, OID *out_oid) { OID oid = INVALID_OID; @@ -1628,5 +1609,24 @@ ermia::coro::generator ConcurrentMasstreeIndex::coro_Scan(transaction *t, done: co_return c.return_code; } + +void ConcurrentMasstreeIndex::simple_coro_MultiOps(std::vector &rcs, + std::vector::promise_type>> &handles) { + int finished = 0; + while (finished < handles.size()) { + for (int i = 0; i < handles.size(); ++i) { + if (handles[i]) { + if (handles[i].done()) { + ++finished; + rcs[i] = handles[i].promise().get_return_value(); + handles[i].destroy(); + handles[i] = nullptr; + } else { + handles[i].resume(); + } + } + } + } +} #endif } // namespace ermia