[Cogl] [PATCH] poll: Add general way to hook into mainloop without fd

Neil Roberts neil at linux.intel.com
Wed May 15 10:38:15 PDT 2013


Neil Roberts <neil at linux.intel.com> writes:

> This doesn't look right, or at least it's quite different from how
> GMainLoop works. Whenever cogl_poll_renderer_dispatch is called it's
> going to dispatch all of the sources, regardless of whether the timeout
> is actually hit. I notice that the second loop also has the same problem
> because it doesn't check the revents field before dispatching.

Indeed, I've just run into a problem where Cogl hangs with the Wayland
backend in wl_display_dispatch. This function blocks if there are no
events to handle which means that if cogl_poll_renderer_dispatch is
called due to some other source then it will block the application.

Regards,
- Neil
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the Cogl mailing list