Re: closure threading issues



On 30 Mar 2001, Owen Taylor wrote:

> 
> I think the conceptual answer to this is really simple:
> 
>  - Class closures, and their associated data are associated with the 
>    signal, which is associated with the class.
>  - The class won't be unloaded until the object is finalized
>  - The object won't be finalized until the call is finished.
> 
> So class closures don't need refcounting during invocation, and
> since I don't think class closures should be mutating themselves
> during invocation, they don't need locking either.

as every other closure, class closures need to mutate the in_marshal
flag to decide about pre and post notify callback invocation, also
for overridable class closures i don't think we can skip
reference counting.
skipping reference counting for class closures isn't a viable approach
btw, unless class closure invocation wouldn't use g_closure_invoke().

i don't think i really understand how you imagine things to work...
all i know is that our current setup is likely to break with class
closures being used in two different threads.

> 
> Regards,
>                                         Owen
> 

---
ciaoTJ





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]