Go to the FreeLists Home Page Home Signup Help Login
 



Browse interfacekit: This Month's ArchiveMain Archive PageRelated postsPrevious by DateNext by Date

[interfacekit] Re: BLocker

  • From: "burton666@xxxxxxxxx" <burton666@xxxxxxxxx>
  • To: "interfacekit" <interfacekit@xxxxxxxxxxxxx>
  • Date: Mon, 1 Sep 2003 17:14:55 +0200
---------- 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.


Other related posts:

  • [interfacekit] Re: BLocker
  • [interfacekit] Re: BLocker
  • [interfacekit] Re: BLocker
  • [interfacekit] Re: BLocker




  • [ Home | Signup | Help | Login | Archives | Lists ]

    All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
    Everything else ©2008 Avenir Technologies, LLC.