------------------ 原始邮件 ------------------
发件人: Yichun Zhang (agentzh) <age...@gmail.com>
发送时间: 2015年12月22日 13:29
收件人: openresty <openresty@googlegroups.com>
主题: Re: [openresty] receiveuntil(): synchronous api?
Hello!
2015-12-21 21:25 GMT-08:00 黄川:
> 我想建一个dispatcher专门负责和upstream
> cosocket通信,春哥建议用init_worker_by_lua创建线程。cosocket不能直接在init_worker_by_lua中用,也不能在新的环境中用,那我只能在里面用timer建个新的线程,然后这个线程中用死循环不断去pipeline写然后pipeline读,好像没办法读写并行了?
>
同时搞两个轻线程分别负责两个方向上的数据流不就完事了?
Regards,
-agentzh
--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty+subscribe@googlegroups.com
发言: 请发邮件到 openresty@googlegroups.com
退订: 请发邮件至 openresty+unsubscribe@googlegroups.com
归档: http://groups.google.com/group/openresty
官网: http://openresty.org/
仓库: https://github.com/agentzh/ngx_openresty
教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html