Richard Frith-Macdonald <richard <at> tiptree.demon.co.uk> writes:
> (...) > Making it an ivar *fixes* the code to work with an older compiler Making it an ivar breaks the class in thread mode. ;-) > (...) > Actually that's not correct ... the lock is an ivar and is *not* > local to the method, so as the lock can be modified by any method, > the variable to record its state similarly needs to be modified in > any method where the lock is modified. The NSRecursiveLock (did you note the lock is recursive ?) is an ivar, but the [-lock] ans [-unlock] calls are local to the method. Each method that calls lock must call unlock. __gs_isLocked records if [lock] has been called : if it is then [unlock] is called before the method returns. If an other method is called before the [unlock] then your __gs_isLocked ivar is reset (in the _NSANIMATION_UNLOCK of the called method) and [unlock] is never called. > (...) > > Did you run GSTest ? > > Nope. Does that now test animations? Yep. Two demos (not really 'tests'). And they run in threaded mode by default. Xavier _______________________________________________ Gnustep-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnustep-dev
