| 373 | } |
| 374 | |
| 375 | static 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 | |
| 390 | bool Consumer::HasHandleTasks(const int cid) { |
| 391 | return impl_->handle_buckets[cid].empty(); |
nothing calls this directly
no test coverage detected