Giter Club home page Giter Club logo

coroutinecc's Introduction

Coroutinecc 协程库Build Status

未来改进:

  1. 提供对等协程实现
  2. hook进一些systemcall,将所有fd设为非阻塞,并在epoll中切换协程,实现用户侧阻塞IO,实现侧非阻塞效率。

构建 && 测试

$ make
$ bin/test

控制台应当打印:

main start
coroutine 0 : 0
coroutine 1 : 200
coroutine 0 : 1
coroutine 1 : 201
coroutine 0 : 2
coroutine 1 : 202
coroutine 0 : 3
coroutine 1 : 203
coroutine 0 : 4
coroutine 1 : 204
main end

简单的性能测试可以:

$ bin/test-perform

在Ubuntu 16.04LTS, i7-5500U 3GB(VMWARE虚拟机)测试结果为:

switch times test start!
switch times test end!
It can switch 879039.736991 times

coroutinecc's People

Contributors

cunfate 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.