Re: Failed to start grpc server on QNX grpc_combiner_continue_exec_ctx () at grpc_core::ExecCtx::Get()->combiner_data()->active_combiner

41 views
Skip to first unread message
Message has been deleted
Message has been deleted

apo...@google.com

unread,
Aug 12, 2020, 2:23:37 PM8/12/20
to grpc.io
There is a similar conversation in https://github.com/grpc/grpc/issues/23714 with more context -- is this the same issue?

On Thursday, August 6, 2020 at 10:11:34 PM UTC-7 belanke...@gmail.com wrote:
My code is as simple as below:
std::string serverAddr =
      qaic
::qmonInetAll + ":" + std::to_string(config.port);

 
GRPCService service;
 
MonitorService::Service *monitorService = &service;
 
ServiceExt::Service *monitorExtService = &service;

  service
.init();

 
ServerBuilder builder;
  builder
.AddListeningPort(serverAddr, grpc::InsecureServerCredentials());
 
  notification_queue_
= builder.AddCompletionQueue();
  client_queue_
= builder.AddCompletionQueue();
 
  builder
.RegisterService(monitorService);
  builder
.RegisterService(monitorExtService);
  builder
.RegisterService(&monitorAsyncService_);

  server_
= builder.BuildAndStart();
 
LogInfoG("Server listening on {}", serverAddr);

 
// Queue a connect wait request
  initClientSink
();

 
// start 2 threads for receiving messages.
  clientConnectThread_
=
      std
::thread(&QMonitorTaskStarter::startClientConnectThread, this);
  notificationThread_
=
      std
::thread(&QMonitorTaskStarter::startNotificationThread, this);
 
if (asyncTestSupport) {
    type2MsgGenThread_
=
        std
::thread(&QMonitorTaskStarter::genType2Messages, this);
 
}

  readyStatus
.set_value(QS_SUCCESS);

  server_
->Wait();
 
// Kill threads and wait for them to exit
  notification_queue_
->Shutdown();
  client_queue_
->Shutdown();
 
// The threads should exit once a trycancel is called
 
// on every client
  clientConnectThread_
.join();
  notificationThread_
.join();

Let me know if I code is correct.
Reply all
Reply to author
Forward
0 new messages