Thread.VolatileWrite 方法

定义

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

重载

名称 说明
VolatileWrite(UIntPtr, UIntPtr)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(UInt64, UInt64)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(UInt32, UInt32)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(UInt16, UInt16)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(Single, Single)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(SByte, SByte)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(Object, Object)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(IntPtr, IntPtr)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(Int16, Int16)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(Int32, Int32)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(Double, Double)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(Byte, Byte)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(Int64, Int64)
已过时.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

VolatileWrite(UIntPtr, UIntPtr)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

重要

此 API 不符合 CLS。

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(UIntPtr % address, UIntPtr value);
[System.CLSCompliant(false)]
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref UIntPtr address, UIntPtr value);
[System.CLSCompliant(false)]
public static void VolatileWrite(ref UIntPtr address, UIntPtr value);
[<System.CLSCompliant(false)>]
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : unativeint * unativeint -> unit
[<System.CLSCompliant(false)>]
static member VolatileWrite : unativeint * unativeint -> unit
Public Shared Sub VolatileWrite (ByRef address As UIntPtr, value As UIntPtr)

参数

address
UIntPtr

unativeint

要向其写入值的字段。

value
UIntPtr

unativeint

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(UInt64, UInt64)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

重要

此 API 不符合 CLS。

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(System::UInt64 % address, System::UInt64 value);
[System.CLSCompliant(false)]
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref ulong address, ulong value);
[System.CLSCompliant(false)]
public static void VolatileWrite(ref ulong address, ulong value);
[<System.CLSCompliant(false)>]
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : uint64 * uint64 -> unit
[<System.CLSCompliant(false)>]
static member VolatileWrite : uint64 * uint64 -> unit
Public Shared Sub VolatileWrite (ByRef address As ULong, value As ULong)

参数

address
UInt64

要向其写入值的字段。

value
UInt64

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(UInt32, UInt32)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

重要

此 API 不符合 CLS。

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(System::UInt32 % address, System::UInt32 value);
[System.CLSCompliant(false)]
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref uint address, uint value);
[System.CLSCompliant(false)]
public static void VolatileWrite(ref uint address, uint value);
[<System.CLSCompliant(false)>]
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : uint32 * uint32 -> unit
[<System.CLSCompliant(false)>]
static member VolatileWrite : uint32 * uint32 -> unit
Public Shared Sub VolatileWrite (ByRef address As UInteger, value As UInteger)

参数

address
UInt32

要向其写入值的字段。

value
UInt32

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(UInt16, UInt16)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

重要

此 API 不符合 CLS。

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(System::UInt16 % address, System::UInt16 value);
[System.CLSCompliant(false)]
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref ushort address, ushort value);
[System.CLSCompliant(false)]
public static void VolatileWrite(ref ushort address, ushort value);
[<System.CLSCompliant(false)>]
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : uint16 * uint16 -> unit
[<System.CLSCompliant(false)>]
static member VolatileWrite : uint16 * uint16 -> unit
Public Shared Sub VolatileWrite (ByRef address As UShort, value As UShort)

参数

address
UInt16

要向其写入值的字段。

value
UInt16

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(Single, Single)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(float % address, float value);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref float address, float value);
public static void VolatileWrite(ref float address, float value);
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : single * single -> unit
static member VolatileWrite : single * single -> unit
Public Shared Sub VolatileWrite (ByRef address As Single, value As Single)

参数

address
Single

要向其写入值的字段。

value
Single

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(SByte, SByte)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

重要

此 API 不符合 CLS。

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(System::SByte % address, System::SByte value);
[System.CLSCompliant(false)]
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref sbyte address, sbyte value);
[System.CLSCompliant(false)]
public static void VolatileWrite(ref sbyte address, sbyte value);
[<System.CLSCompliant(false)>]
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : sbyte * sbyte -> unit
[<System.CLSCompliant(false)>]
static member VolatileWrite : sbyte * sbyte -> unit
Public Shared Sub VolatileWrite (ByRef address As SByte, value As SByte)

参数

address
SByte

要向其写入值的字段。

value
SByte

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(Object, Object)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(System::Object ^ % address, System::Object ^ value);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref object? address, object? value);
public static void VolatileWrite(ref object? address, object? value);
public static void VolatileWrite(ref object address, object value);
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : obj * obj -> unit
static member VolatileWrite : obj * obj -> unit
Public Shared Sub VolatileWrite (ByRef address As Object, value As Object)

参数

address
Object

要向其写入值的字段。

value
Object

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(IntPtr, IntPtr)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(IntPtr % address, IntPtr value);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref IntPtr address, IntPtr value);
public static void VolatileWrite(ref IntPtr address, IntPtr value);
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : nativeint * nativeint -> unit
static member VolatileWrite : nativeint * nativeint -> unit
Public Shared Sub VolatileWrite (ByRef address As IntPtr, value As IntPtr)

参数

address
IntPtr

nativeint

要向其写入值的字段。

value
IntPtr

nativeint

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(Int16, Int16)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(short % address, short value);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref short address, short value);
public static void VolatileWrite(ref short address, short value);
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : int16 * int16 -> unit
static member VolatileWrite : int16 * int16 -> unit
Public Shared Sub VolatileWrite (ByRef address As Short, value As Short)

参数

address
Int16

要向其写入值的字段。

value
Int16

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(Int32, Int32)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(int % address, int value);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref int address, int value);
public static void VolatileWrite(ref int address, int value);
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : int * int -> unit
static member VolatileWrite : int * int -> unit
Public Shared Sub VolatileWrite (ByRef address As Integer, value As Integer)

参数

address
Int32

要向其写入值的字段。

value
Int32

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(Double, Double)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(double % address, double value);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref double address, double value);
public static void VolatileWrite(ref double address, double value);
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : double * double -> unit
static member VolatileWrite : double * double -> unit
Public Shared Sub VolatileWrite (ByRef address As Double, value As Double)

参数

address
Double

要向其写入值的字段。

value
Double

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(Byte, Byte)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(System::Byte % address, System::Byte value);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref byte address, byte value);
public static void VolatileWrite(ref byte address, byte value);
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : byte * byte -> unit
static member VolatileWrite : byte * byte -> unit
Public Shared Sub VolatileWrite (ByRef address As Byte, value As Byte)

参数

address
Byte

要向其写入值的字段。

value
Byte

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于

VolatileWrite(Int64, Int64)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

将值写入字段。 在需要内存的系统上,插入一个内存屏障,以防止处理器重新排序内存操作,如下所示:如果在代码中出现此方法之前读取或写入,处理器将无法在此方法之后移动它。

public:
 static void VolatileWrite(long % address, long value);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void VolatileWrite(ref long address, long value);
public static void VolatileWrite(ref long address, long value);
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileWrite : int64 * int64 -> unit
static member VolatileWrite : int64 * int64 -> unit
Public Shared Sub VolatileWrite (ByRef address As Long, value As Long)

参数

address
Int64

要向其写入值的字段。

value
Int64

要写入的值。

属性

注解

Thread.VolatileRead 并且 Thread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关详细信息, Volatile 请参阅该类。

适用于