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
0
votes
1 answer

libev's IO watcher runs onto error if underlying FD is closed

I'm using libev for watching FD events, but sometimes I need to close the underlying FD. Therefore, I'm stopping the IO watcher (by calling its stop function), but it seems not enough, as I'm still getting this error after calling close(fd): …
Daniel
  • 2,318
  • 2
  • 22
  • 53
0
votes
0 answers

IO-starving causes?

I have a kind of a complex application, which uses heavy IO: it includes ffmpeg and doing video transcoding (by software, no HW-acceleration is available). This might be unimportant, but I wanted to emphasize it. All video transcoding functions are…
Daniel
  • 2,318
  • 2
  • 22
  • 53
0
votes
1 answer

Running EvPeriodic with a loop

I am trying to run EvPeridoc to log data periodically (every 15 minutes, i.e 900 seconds) to a file.
Nepaluz
  • 669
  • 1
  • 12
  • 27
0
votes
3 answers

Is Node.js production-ready on Windows?

In the new 0.5.1 branch, there is an official Windows executable of Node.js. The Linux version of Node.js uses established libraries such as v8, libev, libeio. Since libev and libeio is for *NIX platforms; is the Windows port of Node.js ready for…
Jeff
  • 14,365
  • 8
  • 30
  • 30
0
votes
0 answers

How to use threads with libev

I'm making a webcrawler and want to spawn a number of threads each with its own event loop to monitor network activity. Here is my code so far: static void my_cb(EV_P_ struct ev_io *w, int revents) { GlobalInfo *g = (GlobalInfo *)w->data; i =…
Yaakov Roth
  • 101
  • 1
0
votes
1 answer

Asynchronous hiredis with libev and pthread, what am I doing wrong?

I am writing a GUI for a small monochromatic display and I want to update the data on the screen every second. The data is stored in a redis database and I am trying to coordinate using pthread, libev, and asynchronous hiredis calls. My plan is to…
aeronbc
  • 36
  • 5
0
votes
1 answer

serial port ttyUSB0 read block when use libev

I have a serial port ttyUSB0, and open it with NONBLOCK. fd = open(args_info.dev_arg, O_RDWR | O_NONBLOCK); use read will immediate return, everything is ok. But when use libev ev_io_init(&serial->recv_ctx->io, serial_recv_cb, fd,…
jianxi sun
  • 340
  • 1
  • 19
0
votes
1 answer

Can I use Timers in Libev on Windows

I have ported my C++ application from Linux to Windows which uses Libev. But I get run time error in my code when timer has started in libev code...Sample code as below... io.set
0
votes
2 answers

linux c++ libev official example show redundant console behavior

I just tried the official example of libev, like below. After compiling and running, I see once I input anything from stdin, the event is triggered, no problem. But what I inputed is still treated as solid input and then appear on my console. My…
Troskyvs
  • 7,537
  • 7
  • 47
  • 115
0
votes
2 answers

libev loop uses 99% of the CPU while idle

So I have a program that runs an libev I/O loop and a timer loop. When the char array hits 7000 chars or the timer loop hits ten seconds its going to JSON POST a service running on localhost. The I/O loop is causing the program to use almost 100%…
0
votes
1 answer

How is ev_timer implemented in libev used by nodejs

setTimeout in nodejs is implemented with c language library libev ev_timer. How does ev_timer work? Is it implemented using polling? If I set a timeout of 30 seconds, does any process check for every milliseconds for pending timeouts?
raju
  • 4,788
  • 15
  • 64
  • 119
0
votes
1 answer

what happend if i didn't call ev_loop_fork in the child

I thought, if I didn't call the ev_loop_fork in the child, then the watcher in child wouldn't be triggered. This is my code, I build the ev_loop with EVBACKEND_EPOLL and EVFLAG_NOENV flags. So there is no EVFLAG_FORKCHECK flag. Then I comment the…
adream307
  • 95
  • 1
  • 7
0
votes
1 answer

locking in io watcher and timer watch in libev

in the libev ,I have initilized the io watcher to catch events and this event causes to store certain value in some cache. I have another timer watcher which runs every 10 sec, reads the cache value. In such case I suppose there is a race condition.…
user5335302
  • 449
  • 1
  • 5
  • 11
0
votes
1 answer

Python cassandra-driver: The C extension needed to use libev was not found

I have Cassandra python driver version 2.5.1 installed with all required dependencies that is libev4, libev-dev, gcc, python-dev. However I am getting following error while importing LibevConnection "The C extension needed to use libev was not…
samarth
  • 3,866
  • 7
  • 45
  • 60
0
votes
2 answers

Libev c++ can't stop dynamic loops in multithread application

I write multithread server with c++ and libev and has one problem. I start default_loop in main thread and create and start dynamic_loop in every slave threads. When I handle signals to stop process I call break_loop(ev::ALL). After that default…
helper helperov
  • 513
  • 3
  • 17