Re: [PATCH] event-loop: Use two-step destruction of event loop sources.

2012-03-21 Thread Kristian Hoegsberg
On Wed, Mar 21, 2012 at 10:31:24AM +0100, Jonas Ådahl wrote: > Instead of directly freeing an event source upon removal put it in a > queue later handled by the event loop; either after a dispatch or upon > event loop destruction. > > This is necessary to avoid already queued up event sources to b

[PATCH] event-loop: Use two-step destruction of event loop sources.

2012-03-21 Thread Jonas Ådahl
Instead of directly freeing an event source upon removal put it in a queue later handled by the event loop; either after a dispatch or upon event loop destruction. This is necessary to avoid already queued up event sources to be freed during some other dispatch callback, causing segmentation fault

Re: [PATCH] event-loop: Use two-step destruction of event loop sources.

2012-03-21 Thread Andreas Ericsson
On 03/21/2012 09:35 AM, Jonas Ådahl wrote: > Instead of directly freeing an event source upon removal put it in a > queue later handled by the event loop; either after a dispatch or upon > event loop destruction. > > This is necessary to avoid already queued up event sources to be freed > during s

[PATCH] event-loop: Use two-step destruction of event loop sources.

2012-03-21 Thread Jonas Ådahl
Instead of directly freeing an event source upon removal put it in a queue later handled by the event loop; either after a dispatch or upon event loop destruction. This is necessary to avoid already queued up event sources to be freed during some other dispatch callback, causing segmentation fault

Re: [PATCH] event-loop: Use two-step destruction of event loop sources.

2012-03-20 Thread Jonas Ådahl
On Tue, Mar 20, 2012 at 3:40 PM, Kristian Høgsberg wrote: > On Tue, Mar 20, 2012 at 9:21 AM, Jonas Ådahl wrote: >> Instead of directly destroying an event source upon removal only destroy >> it in case its event loop is not dispatching. If dispatching the event >> source is marked for destruction

Re: [PATCH] event-loop: Use two-step destruction of event loop sources.

2012-03-20 Thread Kristian Høgsberg
On Tue, Mar 20, 2012 at 9:21 AM, Jonas Ådahl wrote: > Instead of directly destroying an event source upon removal only destroy > it in case its event loop is not dispatching. If dispatching the event > source is marked for destruction and added to the check list and > destroyed in post_dispatch_ch

Re: [PATCH] event-loop: Use two-step destruction of event loop sources.

2012-03-20 Thread Andreas Ericsson
On 03/20/2012 02:21 PM, Jonas Ådahl wrote: > Instead of directly destroying an event source upon removal only destroy > it in case its event loop is not dispatching. If dispatching the event > source is marked for destruction and added to the check list and > destroyed in post_dispatch_check(); if

Re: [PATCH] event-loop: Use two-step destruction of event loop sources.

2012-03-20 Thread Ander Conselvan de Oliveira
On 03/20/2012 03:21 PM, Jonas Ådahl wrote: Instead of directly destroying an event source upon removal only destroy it in case its event loop is not dispatching. If dispatching the event source is marked for destruction and added to the check list and destroyed in post_dispatch_check(); if not it

[PATCH] event-loop: Use two-step destruction of event loop sources.

2012-03-20 Thread Jonas Ådahl
Instead of directly destroying an event source upon removal only destroy it in case its event loop is not dispatching. If dispatching the event source is marked for destruction and added to the check list and destroyed in post_dispatch_check(); if not it is destroyed immediately. Signed-off-by: Jo