Armin Zingler wrote:
> Peter Duniho schrieb:
>> Armin Zingler wrote:
>>> Hi,
>>>
>>> is there a documentation out there that tells me which operations are atomic?
>> Depends on what you mean.
>
> Atomic operations are operations on objects that are performed completely without
> the possibility that another thread reads the object or a part of it in the meantime.
I know what "atomic operation" means. I was referring to your question
about "is there a documentation out there", and the answer depends on
what you mean by _that_. Atomic operations certainly are documented, so
the answer to your question is trivially "yes". But it might not really
be the question you meant to ask, thus my "it depends".
>> The C# specification, for example, is clear about what operations within the language
>> are atomic (certain assignments and reads, specifically).
>
> I'm using VB (2008). I didn't know it's a language specific issue, therefore I posted here.
> Didn't find something specific to VB.
I'm less familiar with VB.NET, but I would hope it would have some
similar atomic guarantees for smaller data types (e.g. System.Int32,
System.Boolean, etc.). Still, I doubt any of those would apply to
System.Decimal.
> Anyway, I've put reading/writing the value inside a Synclock-EndSynclock statement.
Should be fine.
Pete