A C++ framework is based on coroutine and libuv, just using start, await, all_of, any_of to control flow.
一个基于协程和libuv的C++框架,仅通过 start、 await、 all_of、 any_of 控制流程。
- 示例:你需要等待两个udp的recv事件,并且需要设置一个超时时间,则你可以用使用:
await (
any_of (
all_of (
udp0.recv,
udp1.recv
),
sleep(x ms)
)
)
Documents: wiki
Prerequisites (Linux):
* GCC 4.2 or newer
* Python 2.6 or 2.7
* GNU Make 3.81 or newer
* (All of above is for libuv)
Linux:
make
Prerequisites (Windows):
* UnZip (You can extract dependencies by other tools)
* Python 2.6 or 2.7
* Visual Studio 2008 or 2010 or 2012 or 2013
Windows:
run vcbuild.bat
Linux:
make test
Windows:
run vc\test.bat (for Win32)
run vc\test_x64.bat (for Win64)
(The LGPL License)