Expand comment to address reviewer feedback

pull/23653/head
Vijay Pai 4 years ago
parent 968e1b40a5
commit 94a85b051d
  1. 7
      test/cpp/microbenchmarks/bm_cq.cc

@ -211,7 +211,12 @@ static void BM_Callback_CQ_Pass1Core(benchmark::State& state) {
bool got_shutdown = false;
ShutdownCallback shutdown_cb(&got_shutdown);
// This test with stack-allocated completions only works for non-polling or
// EM-polling callback core CQs. For generality, test with non-polling.
// EM-polling callback core CQs because otherwise the callback could execute
// on another thread after the stack objects here go out of scope. An
// alternative would be to synchronize between the benchmark loop and the
// callback, but then it would be measuring the overhead of synchronization
// rather than the overhead of the completion queue.
// For generality, test here with non-polling.
grpc_completion_queue_attributes attr;
attr.version = 2;
attr.cq_completion_type = GRPC_CQ_CALLBACK;

Loading…
Cancel
Save