MCPcopy Create free account
hub / github.com/Tencent/phxqueue / BatchHandleRoutineRun

Function BatchHandleRoutineRun

phxqueue/consumer/consumer.cpp:375–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373}
374
375static void *BatchHandleRoutineRun(void *arg) {
376 co_enable_hook_sys();
377
378 ConsumeCtx_t *ctx = static_cast<ConsumeCtx_t*>(arg);
379
380 while (1) {
381 if (ctx->consumer->HasBatchHandleTasks(ctx->cid)) {
382 co_yield_ct();
383 continue;
384 }
385 ctx->consumer->ProcessAllBatchHandleTasks(ctx->cid);
386 }
387 return nullptr;
388}
389
390bool Consumer::HasHandleTasks(const int cid) {
391 return impl_->handle_buckets[cid].empty();

Callers

nothing calls this directly

Calls 2

HasBatchHandleTasksMethod · 0.80

Tested by

no test coverage detected