Skip to content

Commit

Permalink
Clean up comments a little
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBColton committed Mar 7, 2020
1 parent 48d4d71 commit 41c479e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Plugins/ServerPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,14 @@ CompilerClient::~CompilerClient() {}

CompilerClient::CompilerClient(std::shared_ptr<Channel> channel, MainWindow& mainWindow)
: QObject(&mainWindow), stub(Compiler::NewStub(channel)), mainWindow(mainWindow) {
// start a blocking thread to poll for GRPC events
// and dispatch them back to the GUI thread
std::thread([this](){
while(true) {
void* got_tag = nullptr;
bool ok = false;
bool not_shutdown = this->cq.Next(&got_tag, &ok);
if (!not_shutdown) break;
void* got_tag = nullptr; bool ok = false;
// block for next GRPC event, break if shutdown
if (!this->cq.Next(&got_tag, &ok)) break;
// block until GUI thread handles GRPC event
QMetaObject::invokeMethod(this, "UpdateLoop", Qt::BlockingQueuedConnection,
Q_ARG(void*, got_tag), Q_ARG(bool, ok));
}
Expand Down

0 comments on commit 41c479e

Please sign in to comment.