GRPC C 称为PloteimionQueue关闭,但PostemionQueue.Next在有待处理事件时永远阻
grpc c++ called CompletionQueue shutdown but CompletionQueue.next blocked forever when there is pending event
有两个线程,一个呼叫在完整形式上关闭
debug_log("cq shutdown startn");
cq.Shutdown();
debug_log("cq shutdown successn");
在另一个theads中,cq.next永远被阻止。
我可以看到CQ中有一个悬而未决的事件,但是从文档中,我希望一旦调用关闭,cq.next将开始返回false。
我不知道这里怎么了。
这是CQ.Next
的调用堆栈grpc_iocp_work(grpc_exec_ctx * exec_ctx, gpr_timespec deadline) Line 83 C
grpc_pollset_work(grpc_exec_ctx * exec_ctx, grpc_pollset * pollset, grpc_pollset_worker * * worker_hdl, gpr_timespec now, gpr_timespec deadline) Line 143 C
cq_next(grpc_completion_queue * cc, gpr_timespec deadline, void * reserved) Line 844 C
grpc_completion_queue_next(grpc_completion_queue * cc, gpr_timespec deadline, void * reserved) Line 873 C
grpc::CompletionQueue::AsyncNextInternal(void * * tag, bool * ok, gpr_timespec deadline) Line 71 C++
grpc::CompletionQueue::Next(void * * tag, bool * ok) Line 151 C++
API表示CQ.Next一旦您排干CQ,将返回false。我不确定您是否有一个待定事件的意思,但是如果不是关机事件,您的CQ.Next仍将等待该事件返回之前返回false(在下一个呼叫中)。
相关文章:
- SFML c ++ 当包含文件内游戏中发生事件时,如何使用铃声函数为我的游戏创建声音类?
- 处理C++继承时的最佳做法
- 套接字 read() 函数在处理隧道时有时从不返回 0
- C++ 将 setmode 与 _O_U8TEXT 一起使用来处理 unicode 时崩溃
- 是否可以在QT GUI应用程序中处理事件时播放加载动画指示器?
- 处理中断时,如何回到主gui线程
- WFS_ERR_SIU_INVALID_PORT(-801)启用SIU事件时错误
- 如何在处理C++字符串时使用内存集
- 我在处理字符时遇到麻烦
- 如果窗口服务被杀,如何处理事件
- 在处理 C 字符串时,如何将用户的第一个输入替换为当前输入
- GRPC C 称为PloteimionQueue关闭,但PostemionQueue.Next在有待处理事件时永远阻
- 当不处理指针时,请调用子类(虚拟)函数(较晚绑定)
- WNDPROC处理事件更少的代码
- 发生鼠标滚动事件时如何响应
- 处理字符串时出现超级奇怪的错误
- 尝试实现 Windows API 包装器的事件处理程序时遇到问题
- 服务器在请求已经处理请求时收到请求时会崩溃
- C FLTK 1.3.2:最新的屏幕,处理事件和非障碍睡眠
- 当使用信号处理程序触发事件时,如何使boost.msm正确更改状态