Code Monkey home page Code Monkey logo

liboco's Introduction

Deprecated

See ioucontext, a coöperative multitasking library based on liburing and written in C.

======

liboco

======

liboco is a simple cooperative multitasking event framework written in C++ as an exercise for the author. It is not meant as a replacement for libpthread, libevent, libev, &c.

Requires

Based around ucontext and epoll, it is not currently intended to be portable. In fact, it uses glibc extensions and Linux-specific system calls, so it will probably only compile with that standard library and run on a very modern kernel.

It is also not very safe regarding signals that are not processed via signalfd. In particular, calling core::schedule or core::wait_for_* with any pending signals that were not blocked when core::react was invoked are likely to be handled at that time. Signal masks should not be modified from within tasks.

It comes with the following example programs.

  • rfc862d --- Echo server, bound to any IPv4 address on port 7.
  • rfc862c --- Echo client, connects to 127.0.0.1 on port 7.

and

  • open_fds --- Lists open FDs. When launched as a child, useful for finding FD leaks in parent process.

While liboco is just a toy, the intention is to continue to add features and hammer out some more interesting use-cases.

liboco's People

Stargazers

 avatar

Watchers

 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.