Thread.VolatileWrite 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
向字段中写入值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之前,则处理器无法将其移至此方法之后。
重载
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
注意
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)]
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}")]
public static void VolatileWrite (ref UIntPtr address, UIntPtr value);
[<System.CLSCompliant(false)>]
static member VolatileWrite : unativeint * unativeint -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As UIntPtr, value As UIntPtr)
参数
- address
-
UIntPtr
unativeint
将向其中写入值的字段。
- value
-
UIntPtr
unativeint
要写入的值。
- 属性
注解
Thread.VolatileRead 和 Thread.VolatileWrite 是旧 API,已替换为 Volatile.Read 和 Volatile.Write。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(UInt64, UInt64)
- 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)]
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}")]
public static void VolatileWrite (ref ulong address, ulong value);
[<System.CLSCompliant(false)>]
static member VolatileWrite : uint64 * uint64 -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As ULong, value As ULong)
参数
- address
- UInt64
将向其中写入值的字段。
- value
- UInt64
要写入的值。
- 属性
注解
Thread.VolatileRead 和 Thread.VolatileWrite 是旧 API,已替换为 Volatile.Read 和 Volatile.Write。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(UInt32, UInt32)
- 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)]
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}")]
public static void VolatileWrite (ref uint address, uint value);
[<System.CLSCompliant(false)>]
static member VolatileWrite : uint32 * uint32 -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As UInteger, value As UInteger)
参数
- address
- UInt32
将向其中写入值的字段。
- value
- UInt32
要写入的值。
- 属性
注解
Thread.VolatileRead 和 Thread.VolatileWrite 是旧 API,已替换为 Volatile.Read 和 Volatile.Write。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(UInt16, UInt16)
- 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)]
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}")]
public static void VolatileWrite (ref ushort address, ushort value);
[<System.CLSCompliant(false)>]
static member VolatileWrite : uint16 * uint16 -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As UShort, value As UShort)
参数
- address
- UInt16
将向其中写入值的字段。
- value
- UInt16
要写入的值。
- 属性
注解
Thread.VolatileRead 和 Thread.VolatileWrite 是旧 API,已替换为 Volatile.Read 和 Volatile.Write。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(Single, Single)
- 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);
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}")]
public static void VolatileWrite (ref float address, float value);
static member VolatileWrite : single * single -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As Single, value As Single)
参数
- address
- Single
将向其中写入值的字段。
- value
- Single
要写入的值。
- 属性
注解
Thread.VolatileRead 和 Thread.VolatileWrite 是旧 API,已替换为 Volatile.Read 和 Volatile.Write。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(SByte, SByte)
- 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)]
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}")]
public static void VolatileWrite (ref sbyte address, sbyte value);
[<System.CLSCompliant(false)>]
static member VolatileWrite : sbyte * sbyte -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As SByte, value As SByte)
参数
- address
- SByte
将向其中写入值的字段。
- value
- SByte
要写入的值。
- 属性
注解
Thread.VolatileRead 和 Thread.VolatileWrite 是旧 API,已替换为 Volatile.Read 和 Volatile.Write。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(Object, Object)
- 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);
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}")]
public static void VolatileWrite (ref object? address, object? value);
public static void VolatileWrite (ref object address, object value);
static member VolatileWrite : obj * obj -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As Object, value As Object)
参数
- address
- Object
将向其中写入值的字段。
- value
- Object
要写入的值。
- 属性
注解
Thread.VolatileRead和 Thread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(IntPtr, IntPtr)
- 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);
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}")]
public static void VolatileWrite (ref IntPtr address, IntPtr value);
static member VolatileWrite : nativeint * nativeint -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As IntPtr, value As IntPtr)
参数
- address
-
IntPtr
nativeint
将向其中写入值的字段。
- value
-
IntPtr
nativeint
要写入的值。
- 属性
注解
Thread.VolatileRead和 Thread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(Int16, Int16)
- 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);
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}")]
public static void VolatileWrite (ref short address, short value);
static member VolatileWrite : int16 * int16 -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As Short, value As Short)
参数
- address
- Int16
将向其中写入值的字段。
- value
- Int16
要写入的值。
- 属性
注解
Thread.VolatileRead和 Thread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(Int32, Int32)
- 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);
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}")]
public static void VolatileWrite (ref int address, int value);
static member VolatileWrite : int * int -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As Integer, value As Integer)
参数
- address
- Int32
将向其中写入值的字段。
- value
- Int32
要写入的值。
- 属性
注解
Thread.VolatileRead和 Thread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(Double, Double)
- 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);
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}")]
public static void VolatileWrite (ref double address, double value);
static member VolatileWrite : double * double -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As Double, value As Double)
参数
- address
- Double
将向其中写入值的字段。
- value
- Double
要写入的值。
- 属性
注解
Thread.VolatileRead和 Thread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(Byte, Byte)
- 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);
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}")]
public static void VolatileWrite (ref byte address, byte value);
static member VolatileWrite : byte * byte -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As Byte, value As Byte)
参数
- address
- Byte
将向其中写入值的字段。
- value
- Byte
要写入的值。
- 属性
注解
Thread.VolatileRead和 Thread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。
适用于
VolatileWrite(Int64, Int64)
- 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);
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}")]
public static void VolatileWrite (ref long address, long value);
static member VolatileWrite : int64 * int64 -> unit
[<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
Public Shared Sub VolatileWrite (ByRef address As Long, value As Long)
参数
- address
- Int64
将向其中写入值的字段。
- value
- Int64
要写入的值。
- 属性
注解
Thread.VolatileRead和 Thread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。