Chinesejie
Chinesejie
第七章 的代码
hi,第七章 的代码还没完成吗?还会出第七章的blog吗?
co_sched.Start( ); 是阻塞的,能不能 运行完了就不阻塞呢?
代码这么写: go [=] { // 100行代码 Request request; Response response; // 某段同步rpc代码 rpc_stub.get_(&request, &response); } 我前后用co::CoDebugger::getInstance().GetAllInfo().c_str();打印信息,只看到了100行是task的信息。 但是看不出 rpc_stub.get()这段代码是不是 让出cpu了呢? 我要怎么验证呢? 或者说,只要是rpc的io的肯定是让出了cpu了
 如上图,gcc4.8.2 + boost1_61_0 core + libgo2.6。我使用了一个线程 跑多个协程,在RunUntilNoTask的时候core了。 不使用boost ,可以正常运行。
有时候 task需要共享一些 线程数据,::co::Scheduler启动线程的时候能不能支持回调 函数,让它启动之前init一遍数据
I have test the code as follow. 1) Cacher.py set ht['b']='b' print ht['b'] run "python -i Cacher.py" not close this process 2) Cacher2.py just print ht['b'] without setter run "python...
在没有证书的情况下,怎么判断 请求来自 微信官方。
如果我在server.py 里面做回车处理,如下: def read_message(self): self._stream.read_until('\n', self.broadcast_messages) 这样每个回车键是一次命令。 那跟你这个 def read_message(self): self._stream.read_until_close( self.broadcast_message , self.broadcast_streaming_message) 相比, 优劣势何在