Re: [PATCH] event-loop: Only read one epoll event per loop dispatch.

2012-03-20 Thread Andreas Ericsson
Your MUA seems to spit out 6km long lines, which makes it very hard to read when you also post code so I can't auto-reformat on my end. I'll give it a go though. On 03/20/2012 06:39 PM, Bill Spitzak wrote: > I may not be understanding the problem, or maybe my assumption that > the destruction of a

Re: [PATCH] event-loop: Only read one epoll event per loop dispatch.

2012-03-20 Thread Bill Spitzak
I may not be understanding the problem, or maybe my assumption that the destruction of a "source" is not under Wayland's control. My opinion is that "deferred deletion" is a bad idea. There may be other objects being destroyed that destroy the source, and they rely on the source actually disap

Re: [PATCH] event-loop: Only read one epoll event per loop dispatch.

2012-03-20 Thread Andreas Ericsson
On 03/19/2012 09:44 PM, Bill Spitzak wrote: > > > Jonas Ådahl wrote: >> On Mon, Mar 19, 2012 at 7:10 PM, Bill Spitzak >> wrote: >>> Jonas Ådahl wrote: >>> That would not work because ep[i].data.ptr will already be loaded with the source pointer pointing to deallocated memory. It

Re: [PATCH] event-loop: Only read one epoll event per loop dispatch.

2012-03-20 Thread Jonas Ådahl
On Mon, Mar 19, 2012 at 9:44 PM, Bill Spitzak wrote: > > > Jonas Ådahl wrote: >> >> On Mon, Mar 19, 2012 at 7:10 PM, Bill Spitzak wrote: >>> >>> Jonas Ådahl wrote: >>> That would not work because ep[i].data.ptr will already be loaded with the source pointer pointing to deallocated memor

Re: [PATCH] event-loop: Only read one epoll event per loop dispatch.

2012-03-19 Thread Bill Spitzak
Jonas Ådahl wrote: On Mon, Mar 19, 2012 at 7:10 PM, Bill Spitzak wrote: Jonas Ådahl wrote: That would not work because ep[i].data.ptr will already be loaded with the source pointer pointing to deallocated memory. It doesn't matter if that particular source is free:ed and removed from the ep

Re: [PATCH] event-loop: Only read one epoll event per loop dispatch.

2012-03-19 Thread Jonas Ådahl
On Mon, Mar 19, 2012 at 7:10 PM, Bill Spitzak wrote: > Jonas Ådahl wrote: > >> That would not work because ep[i].data.ptr will already be loaded with >> the source pointer pointing to deallocated memory. It doesn't matter >> if that particular source is free:ed and removed from the epoll state >>

Re: [PATCH] event-loop: Only read one epoll event per loop dispatch.

2012-03-19 Thread Bill Spitzak
Jonas Ådahl wrote: That would not work because ep[i].data.ptr will already be loaded with the source pointer pointing to deallocated memory. It doesn't matter if that particular source is free:ed and removed from the epoll state since it has already been triggered to dispatch. Another approach w

Re: [PATCH] event-loop: Only read one epoll event per loop dispatch.

2012-03-19 Thread Jonas Ådahl
On Mon, Mar 19, 2012 at 4:03 PM, Andreas Ericsson wrote: > On 03/17/2012 09:39 AM, Jonas Ådahl wrote: >> In order for users of the event loop to manipulate the state of it or >> others, only one event may be processed per epoll_wait. When multiple >> events are queued up and a user removes an even

Re: [PATCH] event-loop: Only read one epoll event per loop dispatch.

2012-03-19 Thread Andreas Ericsson
On 03/17/2012 09:39 AM, Jonas Ådahl wrote: > In order for users of the event loop to manipulate the state of it or > others, only one event may be processed per epoll_wait. When multiple > events are queued up and a user removes an event input source from an > event loop from within a dispatch, if

[PATCH] event-loop: Only read one epoll event per loop dispatch.

2012-03-17 Thread Jonas Ådahl
In order for users of the event loop to manipulate the state of it or others, only one event may be processed per epoll_wait. When multiple events are queued up and a user removes an event input source from an event loop from within a dispatch, if the removed source was one of the queued up events