Questions tagged [libev]

A full-featured and high-performance event loop that is loosely modelled after libevent, but without its limitations and bugs. It is used, among others, in the GNU Virtual Private Ethernet and rxvt-unicode packages, and in the Deliantra MORPG Server and Client.

A full-featured and high-performance event loop that implements a reactor pattern and event-driven I/O in C. It is loosely modelled after libevent, but without its limitations and bugs

114 questions
2
votes
1 answer

epool with pyev or select from stdlib in Python?

Did someone measure in Python the speed and usefulness of pyev over standard binding through select from Python stdlib? What are benefits of using pyev over select? pyev is build by C extension, so it is not portable solution. I try to build it…
Robert Zaremba
  • 8,081
  • 7
  • 47
  • 78
1
vote
1 answer

C/libev: program closes when event is triggered

I have the following libev code: #include #include #include #include #include #include #include #include #include ev_io stdin_watcher; static void…
Eamorr
  • 9,872
  • 34
  • 125
  • 209
1
vote
2 answers

How does nodejs event loop keep running without a for/while forever loop?

I read Nodejs Event Loop and "Event Loop Explained" and Don't Block the Event Loop I don't think there is a for/while forever loop in nodejs code (js or c++), e.g. as here explains libev event loop…
Qiulang
  • 10,295
  • 11
  • 80
  • 129
1
vote
0 answers

Integrate the Glib main loop into the libev event loop (C++)

I am trying to integrate the Glib main loop into the libev event loop. Actually, I am using their C++ wrappers: glibmm [1] and ev++ [2]. The main idea was taken from the EV::Glib Perl module [3]. However, my implementation sometimes hangs when I try…
Oleksandr Kozlov
  • 697
  • 6
  • 11
1
vote
1 answer

porting sd-bus event to libev

The sd-event is a event loop framework similar to libev, libuv, libevent, etc, I need to implement libev event loop for monitoring services. All the man pages I can find talk about the use of sd_bus_get_fd(), sd_bus_get_events() and…
zhoudingjiang
  • 73
  • 1
  • 11
1
vote
1 answer

Weird timeout from ev_timer

Recently I was trying code libev with threads I just noticed timer always ends at near 60~ second no matter what you set it lower than 60 second. I'm not sure what causes it but I tried make code shortest possible. 1 - Call some io_init and…
1
vote
1 answer

C++ libhiredis with libev and custom event loop

My application uses libhiredis with libev backend. I need to send Redis async commands and process the resulting Redis async callback. However, unlike the simple example from here I cannot use the default event loop. The following code approximates…
Paul Grinberg
  • 1,184
  • 14
  • 37
1
vote
2 answers

What are the limitations of kqueue?

The documentation for libev (source) says that: Kqueue deserves special mention, as at the time of this writing, it was broken on all BSDs except NetBSD (usually it doesn't work reliably with anything but sockets and pipes, except on Darwin, where…
Dietrich Epp
  • 205,541
  • 37
  • 345
  • 415
1
vote
1 answer

How would I use a library that extends libev in a C++ object?

I am trying to implement a wrapper for a library called libumqtt. Libumqtt is a C library that uses libev to have callbacks for events from the MQTT protocol. What I didn't realize until the other day is that I cannot pass a member function to a…
Alexis Evelyn
  • 304
  • 5
  • 17
1
vote
1 answer

Building libevhtp using Mingw

I am building libevhtp on windows using mingw,I have generated Makefileusing cmake and mingw. I am getting error while calling "make"- fatal error: arpa/inet.h: No such file or directory This is the log.c which is giving error. I have checked mingw…
Kay
  • 13
  • 3
1
vote
1 answer

AMQP-CPP, libev > stop ev_loop from another thread

I use AMQP-CPP lib with libev backend. I try to create a class which will open a connection and do consuming. I want to run connection's loop in a worker thread in order not to block the main thread. That part of code looks like…
nabroyan
  • 3,225
  • 6
  • 37
  • 56
1
vote
1 answer

How to read a [nonblocking] filedescriptor of a file that is appended to (aka, like tail -f)?

Actually, I am using libev; but under the hood this is using epoll (I'm only on linux). When I add a watcher to read a file and all data has been read then I do get a call back that there is data to read, but read(2) returns 0 (EOF). At that point I…
Carlo Wood
  • 5,648
  • 2
  • 35
  • 47
1
vote
1 answer

libev + non-blocking socket continuously invokes callback

I'm using libev + non-blocking sockets to send a request to a server. I'm using Keep Alive because I need to send future requests to the destination over this same connection. Behavior Run the program and it fetches the URL and logs to console, as…
bwool84
  • 13
  • 3
1
vote
1 answer

Epoll: does it silently remove fds?

I've been reading through libev's source code and stumbled upon this comment: a) epoll silently removes fds from the fd set. as nothing tells us that an fd has been removed otherwise, we have to continually "rearm" fds that we suspect might have…
freakish
  • 54,167
  • 9
  • 132
  • 169
1
vote
1 answer

How to compile and run a sample program that is using libev on windows 10

How to Build a C++ program that is using libev on Windows 10 using MinGW. Can any body tell me how to compile and link to a sample program that is using libev on Windows 10. I am successful to run our c++ program on linux and want to make it work on…