Created
June 26, 2015 04:32
-
-
Save nicolasnoble/a40a81db45db4f025601 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void HandleRpcs() { | |
new CallData(&service_, cq_.get()); | |
void* tag; | |
bool ok; | |
while (true) { | |
switch (cq_->AsyncNext(&tag, &ok, gpr_inf_past) { | |
case TIMEOUT: | |
doSomethingElseForALittleWhile(); | |
continue; | |
case SHUTDOWN: | |
return; | |
case GOT_EVENT: | |
GPR_ASSERT(ok); | |
static_cast<CallData*>(tag)->Proceed(); | |
break; | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what is gpr_inf_pash mean I can't find this var