[Wayland-bugs] [Bug 80594] event loop test fails from time to time
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Aug 19 03:30:15 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=80594
--- Comment #1 from Marek Chalupa <mchqwerty at gmail.com> ---
Hi,
looked a little bit into it. This occasional failure is caused by epoll_wait
catching only one timer source. Since we have not guaranteed that both timers
will expire exactly at the same time, it may happen that epoll_wait will return
before the later timer expires, having only one fd ready.
The best fix IMO (tried) would be to add getter for source's fd and poll on the
fd until it's ready for reading. This way we could wait for both timers to
expire before calling wl_event_loop_dispatch. This would require change in
libwayland, though.
The solution I therefore chose is just simply sleep a while before entering the
epoll_wait, so that we are "sure" that both timers expired.
Along with the patch solving this, I'm attaching patch that adds some asserts
into this test and fixes wrong indentation.
Cheers,
Marek
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20140819/d707af54/attachment.html>
More information about the Wayland-bugs
mailing list