Code Monkey home page Code Monkey logo

cocoflow's Introduction

Concurrency Control Flow 并发流程控制

A C++ framework is based on coroutine and libuv, just using start, await, all_of, any_of to control flow.

一个基于协程和libuv的C++框架,仅通过 startawaitall_ofany_of 控制流程。

  • 示例:你需要等待两个udp的recv事件,并且需要设置一个超时时间,则你可以用使用:

await (
    any_of (
        all_of (
            udp0.recv,
            udp1.recv
        ),
        sleep(x ms)
    )
)

Documents: wiki

To build:

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

To run the tests:

Linux:

make test

Windows:

run vc\test.bat (for Win32)
run vc\test_x64.bat (for Win64)

License

(The LGPL License)

cocoflow's People

Contributors

chishaxie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.