Coder Social home page Coder Social logo

enki / libev Goto Github PK

View Code? Open in Web Editor NEW
1.6K 76.0 432.0 609 KB

Full-featured high-performance event loop loosely modelled after libevent

Home Page: http://software.schmorp.de/pkg/libev

License: Other

C 25.82% C++ 2.31% Shell 38.30% Makefile 3.44% M4 0.22% Groff 29.90%

libev's Introduction

libev is a high-performance event loop/event model with lots of features.
(see benchmark at http://libev.schmorp.de/bench.html)


ABOUT

   Homepage: http://software.schmorp.de/pkg/libev
   Mailinglist: [email protected]
                http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
   Library Documentation: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod

   Libev is modelled (very losely) after libevent and the Event perl
   module, but is faster, scales better and is more correct, and also more
   featureful. And also smaller. Yay.

   Some of the specialties of libev not commonly found elsewhere are:
   
   - extensive and detailed, readable documentation (not doxygen garbage).
   - fully supports fork, can detect fork in various ways and automatically
     re-arms kernel mechanisms that do not support fork.
   - highly optimised select, poll, epoll, kqueue and event ports backends.
   - filesystem object (path) watching (with optional linux inotify support).
   - wallclock-based times (using absolute time, cron-like).
   - relative timers/timeouts (handle time jumps).
   - fast intra-thread communication between multiple
     event loops (with optional fast linux eventfd backend).
   - extremely easy to embed (fully documented, no dependencies,
     autoconf supported but optional).
   - very small codebase, no bloated library, simple code.
   - fully extensible by being able to plug into the event loop,
     integrate other event loops, integrate other event loop users.
   - very little memory use (small watchers, small event loop data).
   - optional C++ interface allowing method and function callbacks
     at no extra memory or runtime overhead.
   - optional Perl interface with similar characteristics (capable
     of running Glib/Gtk2 on libev).
   - support for other languages (multiple C++ interfaces, D, Ruby,
     Python) available from third-parties.

   Examples of programs that embed libev: the EV perl module, node.js,
   auditd, rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the
   Deliantra MMORPG server (http://www.deliantra.net/), Rubinius (a
   next-generation Ruby VM), the Ebb web server, the Rev event toolkit.


CONTRIBUTORS

   libev was written and designed by Marc Lehmann and Emanuele Giaquinta.

   The following people sent in patches or made other noteworthy
   contributions to the design (for minor patches, see the Changes
   file. If I forgot to include you, please shout at me, it was an
   accident):

   W.C.A. Wijngaards
   Christopher Layne
   Chris Brody

libev's People

Contributors

enki 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  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

libev's Issues

udp fd write event

Hi,I have a doubt,Usually the udp connection is always writable,but If I add the udp connection write event to epoll via ev_io_start, then when can trigger a writable event ?

just to notify

Hello, windows now support Unix domain sockets; e.g AF_UNIX/AF_LOCAL, so less plaster
and headaches for trying to emulate and support that thing (took them 25 years to get there), you may finally use select and poll without tweaking hooray. Tchuss.

/dev/null on FreeBSD: invalid fd

First, thanks for such a good library. I tried to run unit tests of userver (https://github.com/userver-framework/userver) on FreeBSD 13.1 and got an assert from libev: libev: kqueue found invalid fd. I think it is a problem of libev:

  1. it is not EBADF, it is ENODEV (device doesn't support operation0, /dev/null doesn't support read/write I suppose. One should not assert on that. It looks odd to get "ok, you can read from fd" on Linux and assert on FreeBSD for /dev/null read polls.
  2. the error message is cryptic, it is "operation not supported" and not "invalid fd".

code confused

I am confused about this line of code:

#define VARx(type,name) VAR(name, type name)

I searched the entire project, and can‘t find definition of macro VAR(name, type name), could you please make a short explain? @enki

Adapt libev to QNX7.1

Hi, guy
I am adapting libev to QNX 7.1 recently, but, the interface statfs() is diffrent to QNX, I would appreciate your help.
Best Regards

The library is no longer compatible with C++17

Dear libev experts,

The library is no longer compatible with C++17. I get:
../include/ev++.h:355:46: error: ISO C++17 does not allow dynamic exception specifications
355 | dynamic_loop (unsigned int flags = AUTO) throw (bad_loop)
| ^~~~~
../include/ev++.h:379:46: error: ISO C++17 does not allow dynamic exception specifications
379 | default_loop (unsigned int flags = AUTO) throw (bad_loop)
| ^~~~~

Best regards,
jodier

Libev error on windows

I used libev in my project in windows but I git this error:

"libev: only socket fds supported in this configuration", ioctlsocket (handle, FIONREAD, &arg) == 0
Please help me with the problem.

ev_io_start run only the first time

I watch a file via inotify, when it is updated, i open it via
ev_io_init(..), and ev_io_start();
when all data is read, i close the file ev_io_stop(..), close(fd)

if a other inotify event is comming, when i open the file with:
ev_io_init(..), and ev_io_start();

in this time, the callback is not called, i need to call it explicitly via ev_invoke(...);
but this is a bad solution, if the file is huge, this will block all my other events watchers (timers, sockets, signals ...etc)

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.