[libcamera-devel] [PATCH v3 09/17] py: Switch to non-blocking eventfd

Jacopo Mondi jacopo at jmondi.org
Thu Aug 18 17:02:44 CEST 2022


> On 18/08/2022 17:29, Jacopo Mondi wrote:
> > Hi Tomi
> >
> > On Fri, Jul 01, 2022 at 11:45:13AM +0300, Tomi Valkeinen wrote:
> > > Blocking wait can be easily implemented on top in Python, so rather than
> > > supporting only blocking reads, or supporting both non-blocking and
> > > blocking reads, let's support only non-blocking reads.
> > >
> >
> > I'm not sure why it is better to ask application to do so on out
> > behalf, having to expose the camera manager eventfd...
>
> We want to expose the fd anyway. Most, or at least all serious uses will
> need the fd to wait for the events. That's how it is even before this
> series.
>
> The point of this change is that instead of offering a function to get the
> ready events which blocks if there are no events, we offer a function which
> never blocks.
>
> With this change the users can either just call the function whenever to see
> if there are events, or they can wait for the events with the fd. Previously
> this was not possible.

I would have expected a non-blocking "eventReady()" and a blocking
implementation inside the python wrapper instead of having apps to
instrument a selector. Maybe that's typical for Python ?


>
>  Tomi


More information about the libcamera-devel mailing list