Re: Atomicity Question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote:

Actually -- come to think of it, I need to *lock* instead (i.e. not use a
volatile variable) in the code which prompted me to ask this question,
anyway.

> Not necessarily. You either need to make the variable volatile, or (my
> preferred route) always access shared data from within a lock.

Hmm... I'm beginning to see why you prefer to always use locking. :-)
.



Relevant Pages

  • Re: stop automatically changing formula!
    ... The $ signs in Bernie's example will lock the Row/Column references, ... be used in any combination you like, locking down just Row or just Column or ... Prev by Date: ...
    (microsoft.public.excel)
  • Re: How to use Volatile on field of type long ?
    ... The bool cannot be partially ... why that would mean you *won't* put locking ... lock the call to property instead of lock inside the property. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Serious Threading.Monitor issues in .NET 2.0
    ... the problem is locking on "this", ... lock on a private object ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • cant understand flock()
    ... will flock wait until a different process releases the lock? ... I'd like to use flockin a manner that when locking attempt fails on ... Prev by Date: ...
    (comp.lang.php)
  • Re: using clustered index to optimize inserts ...
    ... I will try to explain locking in terms of Sybase docs... ... Allpages Locking: Allpages locking locks both data pages and index ... the data page is locked with an exclusive lock. ... Clustered Index: The datarows will be arranged as per the clustered ...
    (comp.databases.sybase)