By the way, setting io_collect_interval to 0.1 solves the problem with hanging for this simple program that reads a file. However, it doesn't help for a more complex program that has a lot of different async calls. Does this information give some hints for figuring out a root cause?
On Wed, Jul 7, 2021 at 9:21 PM Marc Lehmann <schm...@schmorp.de> wrote: > On Wed, Jul 07, 2021 at 08:59:01AM +0200, Oleksandr Kozlov < > aleks.a.koz...@gmail.com> wrote: > > I've tried to replace std::map with std::vector, but this didn't help. > > Actually, I used std::list instead of std::vector, because ev::io has > > a private copy constructor, but we might need to resize a vector > > Right, I ould have thought you'd use pointers as you'd have a similar > problem > with std::map, but indeed, post-C+03 supports elements without copy > constructors in some circumstances. Anyway, speed is not your problem. > > In any case, this is a guaranteed problöem that needs to be fixed in > soemway or another. > > > By the way, it turned out that C-language implementation from EV::Glib > > behaves in the same way: also hangs. > > Then I would check whether the glib watchers are actually legal. > > > It worth to mention, that I've tried to create ev::idle to prevent the > > event loop > > from sleeping. This solves the problem with hanging, but the busy loop > loads > > CPU for 100%. > > I suspect the only realistic way forward is to understand why the program > is hanging. Hanging in the kernel call is unliekyl to be a problem with > libev, but more likely a problem with the glib program waiting for events > when that libev doesn't wait for. > > -- > The choice of a Deliantra, the free code+content > MORPG > -----==- _GNU_ http://www.deliantra.net > ----==-- _ generation > ---==---(_)__ __ ____ __ Marc Lehmann > --==---/ / _ \/ // /\ \/ / schm...@schmorp.de > -=====/_/_//_/\_,_/ /_/\_\ >
_______________________________________________ libev mailing list libev@lists.schmorp.de http://lists.schmorp.de/mailman/listinfo/libev