Re: any feedback on the refcount patch?

From: Robert Collins <robertc@dont-contact.us>
Date: 12 Nov 2002 11:10:48 +1100

On Tue, 2002-11-12 at 02:55, Henrik Nordstrom wrote:
> mån 2002-11-11 klockan 16.39 skrev Robert Collins:
>
> > Ok, well I'll bring it in in the weekend (assuming I have internet :}).
> >
> > What sort of intuitiveness are you looking at for cbdata?
>
> There is problems today due to the lack of reference counting for the
> owner, easily ending up in race conditions when you call cbdataFree() in
> a callback chain (which is our usual situation).
>
> This problem can be seen at a couple of places in the code today where a
> manual "cbdataInternalLock()" have been needed (usually with a "ouch"
> comment next to it). Hope to get rid of this race in some nice manner.

Yeah, refcount suffers from this too. Basically each stack frame needs
to increment the refcount on entry and decrement on exit. For objects
this is the 'this' variable.

Rob

Received on Mon Nov 11 2002 - 17:11:01 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:18:42 MST