[eio] groups? multiple libev loops?
ry at tinyclouds.org
Fri Oct 17 15:19:36 CEST 2008
1. Are groups used to execute several requests sequentially in one thread?
2. Do you have a suggestion for how to use eio with multiple ev loops?
By doing the pipe trick, like in your example, then adding ev_io
watchers on the read end of the pipe, one can poll. The eio_req
callbacks can invoke ev_sync watchers. This works abiet slightly
complicated, needing to add a pipe watcher to each loop.
The only problem is that suppose you have the following situation. two
ev_loops one of which has sent a bunch of eio requests - and then
stops looping (perhaps it was executed with ev_loop(loop,
EV_ONESHOT)). when the other loop is executed - all of the first
loop's eio requests get handled despite the fact that the other loop
is frozen for a while. although i have no evidence of this actually
being a problem, it seems it could be problematic.
Do I have this right? Is there a different way to use eio with
multiple ev loops?
More information about the libev