From 4c5bd4f023001f40ad4707e511a07cf81abf3d20 Mon Sep 17 00:00:00 2001 From: yongjunh Date: Sat, 19 Dec 2020 01:44:35 -0800 Subject: [PATCH] move new function to the end of corobase.cc --- corobase.cc | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) 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