A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/api/system.threading.interlocked.read below:

Interlocked.Read Method (System.Threading) | Microsoft Learn

Interlocked.Read Method Definition Overloads Read(UInt64)

Returns a 64-bit unsigned value, loaded as an atomic operation.

Read(Int64)

Returns a 64-bit value, loaded as an atomic operation.

Read(UInt64)
Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs

Important

This API is not CLS-compliant.

Returns a 64-bit unsigned value, loaded as an atomic operation.

public:
 static System::UInt64 Read(System::UInt64 % location);
[System.CLSCompliant(false)]
public static ulong Read(ref ulong location);
[<System.CLSCompliant(false)>]
static member Read : uint64 -> uint64
Public Shared Function Read (ByRef location As ULong) As ULong
Parameters
location
UInt64

The 64-bit value to be loaded.

Returns

The loaded value.

Attributes
Remarks

The Read method is unnecessary on 64-bit systems, because 64-bit read operations are already atomic. On 32-bit systems, 64-bit read operations are not atomic unless performed using Read.

Important

On 32-bit platforms, despite taking a readonly reference parameter, this method requires write access to the memory location because it uses CompareExchange internally to ensure atomicity. Attempting to read from read-only memory (such as memory-mapped files opened with read-only access) can result in an AccessViolationException.

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4