---------- Initial Header -----------
From : interfacekit-bounce@xxxxxxxxxxxxx
To : interfacekit@xxxxxxxxxxxxx
Cc :
Date : Mon, 01 Sep 2003 08:13:36 -0700
Subject : [interfacekit] Re: BLocker's implementation issue(?)
> Unless I'm horribly mistaken (and I'm sure I will be quickly corrected
> if I am), this implementation is fine. oldBenaphoreCount is a stack
> variable that is only going to exist in the thread it was created -- if
> another thread is in this function, it will get its own instant of
> oldBenaphoreCount. The danger is only that separate threads operating
> on the same object will get into a race condition incrementing
> fBenaphoreCount, which the atomic_count deals with nicely.
Yeah. What I wanted to say isn't exactly what I wrote :)
I tought there was going to be issues if our fOldBenaphoreCount wasn't
reflecting the current situation (i.e. another thread changed the value of the
refcounting variable, so fOldBenaphoreCount didn't reflect the current
situation). But as Axel said, there is no problem.