Re: How to use Volatile on field of type long ?



>I'm not sure what you mean by "because such things cannot end up in a
>race condition"
I mean such operations are atomic. The bool cannot be partially
updated.
(or rather, why that would mean you *won't* put locking
>in).
I did said access to the var is not synchronized. On multi-processor
box, one thread might not see changes made by other thread. In some
situations, that is not a problem. In situations that matters, I often
lock the call to property instead of lock inside the property. That is
whay I said "I won't".

Thi

.



Relevant Pages

  • Re: Atomicity Question
    ... > preferred route) always access shared data from within a lock. ... Hmm... ... I'm beginning to see why you prefer to always use locking. ... Prev by Date: ...
    (microsoft.public.dotnet.framework)
  • 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: 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)