Thread.VolatileWrite メソッド
定義
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
オーバーロード
VolatileWrite(UIntPtr, UIntPtr) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(UInt64, UInt64) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(UInt32, UInt32) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(UInt16, UInt16) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(Single, Single) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(SByte, SByte) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(Object, Object) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(IntPtr, IntPtr) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(Int16, Int16) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(Int32, Int32) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(Double, Double) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(Byte, Byte) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(Int64, Int64) |
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer. |
VolatileWrite(UIntPtr, UIntPtr)
重要
この API は CLS 準拠ではありません。
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(UIntPtr % address, UIntPtr value);
public static void VolatileWrite (ref UIntPtr address, UIntPtr value);
[System.CLSCompliant(false)]
public static void VolatileWrite (ref UIntPtr address, UIntPtr value);
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
値を書き込むフィールド。The field to which the value is to be written.
- value
- UIntPtr
書き込む値。The value to be written.
- 属性
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(UInt64, UInt64)
重要
この API は CLS 準拠ではありません。
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(System::UInt64 % address, System::UInt64 value);
public static void VolatileWrite (ref ulong address, ulong value);
[System.CLSCompliant(false)]
public static void VolatileWrite (ref ulong address, ulong value);
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
値を書き込むフィールド。The field to which the value is to be written.
- value
- UInt64
書き込む値。The value to be written.
- 属性
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(UInt32, UInt32)
重要
この API は CLS 準拠ではありません。
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(System::UInt32 % address, System::UInt32 value);
public static void VolatileWrite (ref uint address, uint value);
[System.CLSCompliant(false)]
public static void VolatileWrite (ref uint address, uint value);
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
値を書き込むフィールド。The field to which the value is to be written.
- value
- UInt32
書き込む値。The value to be written.
- 属性
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(UInt16, UInt16)
重要
この API は CLS 準拠ではありません。
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(System::UInt16 % address, System::UInt16 value);
public static void VolatileWrite (ref ushort address, ushort value);
[System.CLSCompliant(false)]
public static void VolatileWrite (ref ushort address, ushort value);
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
値を書き込むフィールド。The field to which the value is to be written.
- value
- UInt16
書き込む値。The value to be written.
- 属性
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(Single, Single)
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(float % address, float value);
public static void VolatileWrite (ref float address, float value);
static member VolatileWrite : single * single -> unit
Public Shared Sub VolatileWrite (ByRef address As Single, value As Single)
パラメーター
- address
- Single
値を書き込むフィールド。The field to which the value is to be written.
- value
- Single
書き込む値。The value to be written.
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(SByte, SByte)
重要
この API は CLS 準拠ではありません。
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(System::SByte % address, System::SByte value);
public static void VolatileWrite (ref sbyte address, sbyte value);
[System.CLSCompliant(false)]
public static void VolatileWrite (ref sbyte address, sbyte value);
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
値を書き込むフィールド。The field to which the value is to be written.
- value
- SByte
書き込む値。The value to be written.
- 属性
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(Object, Object)
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(System::Object ^ % address, System::Object ^ value);
public static void VolatileWrite (ref object address, object value);
static member VolatileWrite : obj * obj -> unit
Public Shared Sub VolatileWrite (ByRef address As Object, value As Object)
パラメーター
- address
- Object
値を書き込むフィールド。The field to which the value is to be written.
- value
- Object
書き込む値。The value to be written.
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(IntPtr, IntPtr)
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(IntPtr % address, IntPtr value);
public static void VolatileWrite (ref IntPtr address, IntPtr value);
static member VolatileWrite : nativeint * nativeint -> unit
Public Shared Sub VolatileWrite (ByRef address As IntPtr, value As IntPtr)
パラメーター
- address
- IntPtr
値を書き込むフィールド。The field to which the value is to be written.
- value
- IntPtr
書き込む値。The value to be written.
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(Int16, Int16)
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(short % address, short value);
public static void VolatileWrite (ref short address, short value);
static member VolatileWrite : int16 * int16 -> unit
Public Shared Sub VolatileWrite (ByRef address As Short, value As Short)
パラメーター
- address
- Int16
値を書き込むフィールド。The field to which the value is to be written.
- value
- Int16
書き込む値。The value to be written.
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(Int32, Int32)
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(int % address, int value);
public static void VolatileWrite (ref int address, int value);
static member VolatileWrite : int * int -> unit
Public Shared Sub VolatileWrite (ByRef address As Integer, value As Integer)
パラメーター
- address
- Int32
値を書き込むフィールド。The field to which the value is to be written.
- value
- Int32
書き込む値。The value to be written.
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(Double, Double)
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(double % address, double value);
public static void VolatileWrite (ref double address, double value);
static member VolatileWrite : double * double -> unit
Public Shared Sub VolatileWrite (ByRef address As Double, value As Double)
パラメーター
- address
- Double
値を書き込むフィールド。The field to which the value is to be written.
- value
- Double
書き込む値。The value to be written.
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(Byte, Byte)
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(System::Byte % address, System::Byte value);
public static void VolatileWrite (ref byte address, byte value);
static member VolatileWrite : byte * byte -> unit
Public Shared Sub VolatileWrite (ByRef address As Byte, value As Byte)
パラメーター
- address
- Byte
値を書き込むフィールド。The field to which the value is to be written.
- value
- Byte
書き込む値。The value to be written.
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.
適用対象
VolatileWrite(Int64, Int64)
値をフィールドにすぐに書き込みます。値はコンピューター内のすべてのプロセッサに対して可視になります。Writes a value to a field immediately, so that the value is visible to all processors in the computer.
public:
static void VolatileWrite(long % address, long value);
public static void VolatileWrite (ref long address, long value);
static member VolatileWrite : int64 * int64 -> unit
Public Shared Sub VolatileWrite (ByRef address As Long, value As Long)
パラメーター
- address
- Int64
値を書き込むフィールド。The field to which the value is to be written.
- value
- Int64
書き込む値。The value to be written.
注釈
VolatileRead と VolatileWrite は、特殊な同期を行う場合に使用します。VolatileRead and VolatileWrite are for special cases of synchronization. 通常の状況では、C# lock
ステートメント、Visual Basic SyncLock
ステートメント、およびクラスを使用すると、 Monitor 簡単に代替できます。Under normal circumstances, the C# lock
statement, the Visual Basic SyncLock
statement, and the Monitor class provide easier alternatives.
マルチプロセッサシステムで VolatileWrite は、メモリ位置に書き込まれた値がすべてのプロセッサに直ちに表示されることを保証します。On a multiprocessor system, VolatileWrite ensures that a value written to a memory location is immediately visible to all processors. これには、プロセッサキャッシュのフラッシュが必要になる場合があります。This might require flushing processor caches.
ユニプロセッサシステムであっても、 VolatileRead VolatileWrite 値が読み取られ、メモリに書き込まれ、キャッシュされないことを確認します (たとえば、プロセッサレジスタなど)。Even on a uniprocessor system, VolatileRead and VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). そのため、別のスレッドまたはハードウェアによって更新できるフィールドへのアクセスを同期するために使用できます。Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.
このメソッドを呼び出すと、1つのメモリアクセスだけに影響します。Calling this method affects only a single memory access. フィールドへの有効な同期を提供するには、フィールドへのすべてのアクセスでまたはを使用する必要があり VolatileRead VolatileWrite ます。To provide effective synchronization for a field, all access to the field must use VolatileRead or VolatileWrite.
注意
C# では、フィールドに対して修飾子を使用すると、 volatile
そのフィールドへのすべてのアクセスがまたはを使用することが保証され VolatileRead VolatileWrite ます。In C#, using the volatile
modifier on a field guarantees that all access to that field uses VolatileRead or VolatileWrite.