GithubHelp home page GithubHelp logo

lupus / libevfibers Goto Github PK

View Code? Open in Web Editor NEW
139.0 139.0 33.0 1.55 MB

Small C fiber library that uses libev based event loop and libcoro based coroutine context switching.

License: Apache License 2.0

CMake 3.52% C 94.81% Shell 0.83% HTML 0.84% Vim Script 0.01%

libevfibers's People

Contributors

alexeyknyshev avatar carns avatar jswirl avatar lupus avatar msaf1980 avatar tigra564 avatar umorrian 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

libevfibers's Issues

features suggestion: pkg-config support

It would be helpful if libevfibers provided an evfibers.pc file for pkg-config at make install time, particularly since there are possibly a collection of indirect library dependencies needed to use libevfibers.

make failure if Check not installed

If you compile libevfibers without first installing the "check" unit testing framework, then the build will fail as shown below. The package is easy to install to resolve the problem, but maybe cmake needs to look for that package up front?

libevfibers/test/init.c:20:19: fatal error: check.h: No such file or directory
 #include <check.h>
                   ^
compilation terminated.
test/CMakeFiles/evfibers_test.dir/build.make:54: recipe for target 'test/CMakeFiles/evfibers_test.dir/init.c.o' failed

Implement analog of Go channels

Currently there is fbr_buffer, which is a heavy-weight byte oriented virtual ring buffer with fiber synchronization.

Since fibers are very similar to goroutines, it makes sense to leverage an existing and well designed concept, which would result in more clean and lightweight replacement for fbr_buffer.

missing eio.h header

If you elect to use the "embedded" eio option, then when you run make install you get an include/evfibers/eio.h that contains the fbr_* wrappers for each eio function. However, this header includes , which is the native interface to libeio, and this header is not installed.

The workaround is simple: use a standalone build of libeio rather than the embedded one.

missing -lm and -lrt in evfibers_test target

When compiling on Ubuntu 15.04, the make (and make install) fails to link evfibers_test due to some unresolved symbols. The solution is to add -lm and -lrt to the libraries for this target. I'm not exactly sure how to do this the proper way in cmake, though :)

memory leaks in fbr_buffer

A test application that creates a fbr_buffer and destroys it in a loop is leaking virtual memory.

Probably that's a bug in libvrb, which is used a provider of virtual ring buffer.

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.