[Kst] Re: kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Sat Jul 17 01:33:58 CEST 2004


On Friday 16 July 2004 18:48, Barth Netterfield wrote:
> CVS commit by netterfield:
>
> Some race removal in curve and vector dialogs.
> Should be reviewed.

  Yup :)

> +  // readlock the vectors, bexause when we update the curve, they get read
>    KstReadLocker rl1(*VX), rl2(*VY);
> +  if (EX != KST::vectorList.end()) {
> +    KstReadLocker rl3(*EX);
> +  }
> +  if (EY != KST::vectorList.end()) {
> +    KstReadLocker rl4(*EY);
> +  }

   KstReadLocker works only in the scope it's instantiated in.  Therefore this 
lock unlocks immediately.  I guess you could theoretically put this 
ReadLocker on the heap and then delete it later to achieve your desired 
effect.  Sounds like it's asking for deadlock in the future though.  I'll go 
through this file and the others and clean all this stuff up.  For now we 
don't seem to be hitting any races in the common case, so while they need to 
be fixed, I think we're ok for the next week or so.

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/



More information about the Kst mailing list