libco is a coroutine library which is widely used in wechat back-end service. It has been running on tens of thousands of machines since 2013.
libco is a coroutine library which is widely used in wechat back-end service. It has been running on tens of thousands of machines since 2013.
Libco is a c/c++ coroutine library that is widely used in WeChat services. It has been running on tens of thousands of machines since 2013.
By linking with libco, you can easily transform synchronous back-end service into coroutine service. The coroutine service will provide out-standing concurrency compare to multi-thread approach. With the system hook, You can easily coding in synchronous way but asynchronous executed.
You can also use co_create/co_resume/co_yield interfaces to create asynchronous back-end service. These interface will give you more control of coroutines.
By libco copy-stack mode, you can easily build a back-end service support tens of millions of tcp connection.
libco是微信后台大规模使用的c/c++协程库,2013年至今稳定运行在微信后台的数万台机器上。
libco通过仅有的几个函数接口 co_create/co_resume/co_yield 再配合 co_poll,可以支持同步或者异步的写法,如线程库一样轻松。同时库里面提供了socket族函数的hook,使得后台逻辑服务几乎不用修改逻辑代码就可以完成异步化改造。
作者: sunnyxu([email protected]), leiffyli([email protected]), [email protected]([email protected]), sarlmolchen([email protected])
PS: 近期将开源PaxosStore,敬请期待。
$ cd /path/to/libco
$ makeor use cmake
$ cd /path/to/libco
$ mkdir build
$ cd build
$ cmake ..
$ make腾讯C++代码风格与易读性都这样吗?
期望支持一下跨平台,比如Windows
if a variable defined by CO_ROUTINE_SPECIFIC is referenced in multiple cpps, multiple instances of the variable will be generated under release build
co_get_curr_thread_env 崩溃
mkdir build;cmake .. 有问题啊,符号找不到:undefined reference to `clsCoMutex::clsCoMutex()'
如何为一个调用了gethostbyname的协程设置超时时间?
使用jemalloc导致deadlock
使用 cmake 编译出现 undefined exception 错误
请问ARM架构支持吗,谢谢
libcolib.so动态库存在内存泄漏问题