enki / libev Goto Github PK
View Code? Open in Web Editor NEWFull-featured high-performance event loop loosely modelled after libevent
Home Page: http://software.schmorp.de/pkg/libev
License: Other
Full-featured high-performance event loop loosely modelled after libevent
Home Page: http://software.schmorp.de/pkg/libev
License: Other
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
This is useful to embed libev into a another separate event library.
libuv has this for instance: http://docs.libuv.org/en/v1.x/loop.html#c.uv_backend_fd
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
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 ?
Hi I am getting "epoll_wait: Bad file descriptor". this causes my application to close.
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:
How do you compile it on windows?
Does it require compiling?
Thanks.
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
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)
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.
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.