AutoResetEventとは? わかりやすく解説

AutoResetEvent クラス

イベント発生したことを待機中のスレッド通知します。このクラス継承できません。

名前空間: System.Threading
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<ComVisibleAttribute(True)> _
Public NotInheritable Class
 AutoResetEvent
    Inherits EventWaitHandle
Dim instance As AutoResetEvent
[ComVisibleAttribute(true)] 
public sealed class AutoResetEvent : EventWaitHandle
[ComVisibleAttribute(true)] 
public ref class AutoResetEvent sealed : public
 EventWaitHandle
/** @attribute ComVisibleAttribute(true) */ 
public final class AutoResetEvent extends EventWaitHandle
ComVisibleAttribute(true) 
public final class AutoResetEvent extends
 EventWaitHandle
解説解説
メモメモ

このクラス適用される HostProtectionAttribute 属性Resources プロパティの値は、Synchronization または ExternalThreading です。HostProtectionAttribute は、デスクトップ アプリケーション (一般的にはアイコンダブルクリックコマンド入力、またはブラウザURL入力して起動するアプリケーション) には影響しません。詳細については、HostProtectionAttribute クラストピックまたは「SQL Server プログラミングホスト保護属性」を参照してください

.NET Framework Version 2.0 では、AutoResetEvent新しい EventWaitHandle クラスから派生します。AutoResetEvent は、機能的には EventResetMode.AutoReset で作成した EventWaitHandle同等です。

AutoResetEvent使用すると、スレッドシグナル通じて相互に通信できます通常このような通信は、複数スレッド1 つリソースに対して排他的なアクセスを必要とする場合使用します

スレッドAutoResetEvent の WaitOne を呼び出すことによってシグナル待機します。AutoResetEvent が非シグナル状態の場合スレッドブロックしリソースを現在制御しているスレッドSet呼び出すことによってリソース使用可能になったことをシグナル通知するまで待機します。

Set呼び出すと、AutoResetEventシグナル送られ待機しているスレッド解放されます。AutoResetEvent は、待機している最後スレッド解放されるまでシグナル状態のままとなり、最後スレッド解放される自動的にシグナル状態に戻ります待機中のスレッドない場合、状態は無限にシグナル状態のままです。

AutoResetEvent初期状態は、コンストラクタBoolean 値を渡すことによって制御できます初期状態シグナル状態にする場合true渡しそれ以外場合false渡します

AutoResetEvent は、staticWaitAll メソッドおよび WaitAny メソッドでも使用できます

スレッドの同期機構詳細については、概念説明ドキュメントの「AutoResetEvent」を参照してください

使用例使用例

待機ハンドル使用して複雑な数値計算の各段階完了シグナル通知する例を次に示します計算形式は、result = first term + second term + third term です。各項目には、事前計算と、算出され基数使用した最終計算が行われます

Imports System
Imports System.Threading

Public Class CalculateTest

    <MTAThreadAttribute> _
    Shared Sub Main()
        Dim calc As New
 Calculate()
        Console.WriteLine("Result = {0}.", _
            calc.Result(234).ToString())
        Console.WriteLine("Result = {0}.", _
            calc.Result(55).ToString())
    End Sub
End Class

Public Class Calculate

    Dim baseNumber, firstTerm, secondTerm, thirdTerm As
 Double
    Dim autoEvents() As AutoResetEvent
    Dim manualEvent As ManualResetEvent

    ' Generate random numbers to simulate the actual calculations.
    Dim randomGenerator As Random 

    Sub New()
        autoEvents = New AutoResetEvent(2) { _
            New AutoResetEvent(False), _
            New AutoResetEvent(False), _
            New AutoResetEvent(False) }

        manualEvent = New ManualResetEvent(False)
    End Sub

    Private Sub CalculateBase(stateInfo As
 Object)
        baseNumber = randomGenerator.NextDouble()

        ' Signal that baseNumber is ready.
        manualEvent.Set()
    End Sub

    ' The following CalculateX methods all perform the same
    ' series of steps as commented in CalculateFirstTerm.

    Private Sub CalculateFirstTerm(stateInfo
 As Object)
    
        ' Perform a precalculation.
        Dim preCalc As Double
 = randomGenerator.NextDouble()

        ' Wait for baseNumber to be calculated.
        manualEvent.WaitOne()

        ' Calculate the first term from preCalc and baseNumber.
        firstTerm = preCalc * baseNumber * _
            randomGenerator.NextDouble()

        ' Signal that the calculation is finished.
        autoEvents(0).Set()
    End Sub

    Private Sub CalculateSecondTerm(stateInfo
 As Object)
        Dim preCalc As Double
 = randomGenerator.NextDouble()
        manualEvent.WaitOne()
        secondTerm = preCalc * baseNumber * _
            randomGenerator.NextDouble()
        autoEvents(1).Set()
    End Sub

    Private Sub CalculateThirdTerm(stateInfo
 As Object)
        Dim preCalc As Double
 = randomGenerator.NextDouble()
        manualEvent.WaitOne()
        thirdTerm = preCalc * baseNumber * _
            randomGenerator.NextDouble()
        autoEvents(2).Set()
    End Sub

    Function Result(seed As Integer)
 As Double

        randomGenerator = New Random(seed)

        ' Simultaneously calculate the terms.
        ThreadPool.QueueUserWorkItem(AddressOf CalculateBase)
        ThreadPool.QueueUserWorkItem(AddressOf CalculateFirstTerm)
        ThreadPool.QueueUserWorkItem(AddressOf CalculateSecondTerm)
        ThreadPool.QueueUserWorkItem(AddressOf CalculateThirdTerm)

        ' Wait for all of the terms to be calculated.
        WaitHandle.WaitAll(autoEvents)

        ' Reset the wait handle for the next calculation.
        manualEvent.Reset()

        Return firstTerm + secondTerm + thirdTerm
    End Function

End Class
using System;
using System.Threading;

class CalculateTest
{
    static void Main()
    {
        Calculate calc = new Calculate();
        Console.WriteLine("Result = {0}.", 
            calc.Result(234).ToString());
        Console.WriteLine("Result = {0}.", 
            calc.Result(55).ToString());
    }
}

class Calculate
{
    double baseNumber, firstTerm, secondTerm, thirdTerm;
    AutoResetEvent[] autoEvents;
    ManualResetEvent manualEvent;

    // Generate random numbers to simulate the actual calculations.
    Random randomGenerator;

    public Calculate()
    {
        autoEvents = new AutoResetEvent[]
        {
            new AutoResetEvent(false),
            new AutoResetEvent(false),
            new AutoResetEvent(false)
        };

        manualEvent = new ManualResetEvent(false);
    }

    void CalculateBase(object stateInfo)
    {
        baseNumber = randomGenerator.NextDouble();

        // Signal that baseNumber is ready.
        manualEvent.Set();
    }

    // The following CalculateX methods all perform the same
    // series of steps as commented in CalculateFirstTerm.

    void CalculateFirstTerm(object stateInfo)
    {
        // Perform a precalculation.
        double preCalc = randomGenerator.NextDouble();

        // Wait for baseNumber to be calculated.
        manualEvent.WaitOne();

        // Calculate the first term from preCalc and baseNumber.
        firstTerm = preCalc * baseNumber * 
            randomGenerator.NextDouble();

        // Signal that the calculation is finished.
        autoEvents[0].Set();
    }

    void CalculateSecondTerm(object stateInfo)
    {
        double preCalc = randomGenerator.NextDouble();
        manualEvent.WaitOne();
        secondTerm = preCalc * baseNumber * 
            randomGenerator.NextDouble();
        autoEvents[1].Set();
    }

    void CalculateThirdTerm(object stateInfo)
    {
        double preCalc = randomGenerator.NextDouble();
        manualEvent.WaitOne();
        thirdTerm = preCalc * baseNumber * 
            randomGenerator.NextDouble();
        autoEvents[2].Set();
    }

    public double Result(int seed)
    {
        randomGenerator = new Random(seed);

        // Simultaneously calculate the terms.
        ThreadPool.QueueUserWorkItem(
            new WaitCallback(CalculateBase));
        ThreadPool.QueueUserWorkItem(
            new WaitCallback(CalculateFirstTerm));
        ThreadPool.QueueUserWorkItem(
            new WaitCallback(CalculateSecondTerm));
        ThreadPool.QueueUserWorkItem(
            new WaitCallback(CalculateThirdTerm));

        // Wait for all of the terms to be calculated.
        WaitHandle.WaitAll(autoEvents);

        // Reset the wait handle for the next calculation.
        manualEvent.Reset();

        return firstTerm + secondTerm + thirdTerm;
    }
}
using namespace System;
using namespace System::Threading;
ref class Calculate
{
private:
   double baseNumber;
   double firstTerm;
   double secondTerm;
   double thirdTerm;
   array<AutoResetEvent^>^autoEvents;
   ManualResetEvent^ manualEvent;

   // Generate random numbers to simulate the actual calculations.
   Random^ randomGenerator;

public:
   Calculate()
   {
      autoEvents = gcnew array<AutoResetEvent^>(3);
      autoEvents[ 0 ] = gcnew AutoResetEvent( false );
      autoEvents[ 1 ] = gcnew AutoResetEvent( false );
      autoEvents[ 2 ] = gcnew AutoResetEvent( false );
      manualEvent = gcnew ManualResetEvent( false );
   }


private:
   void CalculateBase( Object^ /*stateInfo*/ )
   {
      baseNumber = randomGenerator->NextDouble();
      
      // Signal that baseNumber is ready.
      manualEvent->Set();
   }


   // The following CalculateX methods all perform the same
   // series of steps as commented in CalculateFirstTerm.
   void CalculateFirstTerm( Object^ /*stateInfo*/ )
   {
      
      // Perform a precalculation.
      double preCalc = randomGenerator->NextDouble();
      
      // Wait for baseNumber to be calculated.
      manualEvent->WaitOne();
      
      // Calculate the first term from preCalc and baseNumber.
      firstTerm = preCalc * baseNumber * randomGenerator->NextDouble();
      
      // Signal that the calculation is finished.
      autoEvents[ 0 ]->Set();
   }

   void CalculateSecondTerm( Object^ /*stateInfo*/ )
   {
      double preCalc = randomGenerator->NextDouble();
      manualEvent->WaitOne();
      secondTerm = preCalc * baseNumber * randomGenerator->NextDouble();
      autoEvents[ 1 ]->Set();
   }

   void CalculateThirdTerm( Object^ /*stateInfo*/ )
   {
      double preCalc = randomGenerator->NextDouble();
      manualEvent->WaitOne();
      thirdTerm = preCalc * baseNumber * randomGenerator->NextDouble();
      autoEvents[ 2 ]->Set();
   }


public:
   double Result( int seed )
   {
      randomGenerator = gcnew Random( seed );
      
      // Simultaneously calculate the terms.
      ThreadPool::QueueUserWorkItem( gcnew WaitCallback( this,
 &Calculate::CalculateBase ) );
      ThreadPool::QueueUserWorkItem( gcnew WaitCallback( this,
 &Calculate::CalculateFirstTerm ) );
      ThreadPool::QueueUserWorkItem( gcnew WaitCallback( this,
 &Calculate::CalculateSecondTerm ) );
      ThreadPool::QueueUserWorkItem( gcnew WaitCallback( this,
 &Calculate::CalculateThirdTerm ) );
      
      // Wait for all of the terms to be calculated.
      WaitHandle::WaitAll( autoEvents );
      
      // Reset the wait handle for the next calculation.
      manualEvent->Reset();
      return firstTerm + secondTerm + thirdTerm;
   }

};

int main()
{
   Calculate^ calc = gcnew Calculate;
   Console::WriteLine( "Result = {0}.", calc->Result( 234 ).ToString()
 );
   Console::WriteLine( "Result = {0}.", calc->Result( 55 ).ToString()
 );
}

import System.*;
import System.Threading.*;

class CalculateTest
{
    public static void main(String[]
 args)
    {
        Calculate calc = new Calculate();
        Console.WriteLine("Result = {0}.", String.valueOf(calc.Result(234)));
        Console.WriteLine("Result = {0}.", String.valueOf(calc.Result(55)));
    } //main
} //CalculateTest

class Calculate
{
    private double baseNumber, firstTerm, secondTerm, thirdTerm;
    private AutoResetEvent autoEvents[];
    private ManualResetEvent manualEvent;

    // Generate random numbers to simulate the actual calculations.
    private Random randomGenerator;

    public Calculate()
    {
        autoEvents = new AutoResetEvent[] { new
 AutoResetEvent(false), 
            new AutoResetEvent(false), new
 AutoResetEvent(false) };
        manualEvent = new ManualResetEvent(false);
    } //Calculate

    void CalculateBase(Object stateInfo)
    {
        baseNumber = randomGenerator.NextDouble();

        // Signal that baseNumber is ready.
        manualEvent.Set();
    } //CalculateBase

    // The following CalculateX methods all perform the same
    // series of steps as commented in CalculateFirstTerm.
    void CalculateFirstTerm(Object stateInfo)
    {
        // Perform a precalculation.
        double preCalc = randomGenerator.NextDouble();

        // Wait for baseNumber to be calculated.
        manualEvent.WaitOne();

        // Calculate the first term from preCalc and baseNumber.
        firstTerm = preCalc * baseNumber * randomGenerator.NextDouble();

        // Signal that the calculation is finished.
        autoEvents[0].Set();
    } //CalculateFirstTerm

    void CalculateSecondTerm(Object stateInfo)
    {
        double preCalc = randomGenerator.NextDouble();

        manualEvent.WaitOne();
        secondTerm = preCalc * baseNumber * randomGenerator.NextDouble();
        autoEvents[1].Set();
    } //CalculateSecondTerm

    void CalculateThirdTerm(Object stateInfo)
    {
        double preCalc = randomGenerator.NextDouble();

        manualEvent.WaitOne();
        thirdTerm = preCalc * baseNumber * randomGenerator.NextDouble();
        autoEvents[2].Set();
    } //CalculateThirdTerm

    public double Result(int seed)
    {
        randomGenerator = new Random(seed);

        // Simultaneously calculate the terms.
        ThreadPool.QueueUserWorkItem(new WaitCallback(CalculateBase));
        ThreadPool.QueueUserWorkItem(new WaitCallback(CalculateFirstTerm));
        ThreadPool.QueueUserWorkItem(new WaitCallback(CalculateSecondTerm));
        ThreadPool.QueueUserWorkItem(new WaitCallback(CalculateThirdTerm));

        // Wait for all of the terms to be calculated.
        WaitHandle.WaitAll(autoEvents);

        // Reset the wait handle for the next calculation.
        manualEvent.Reset();
        return firstTerm + secondTerm + thirdTerm;
    } //Result
} //Calculate
継承階層継承階層
System.Object
   System.MarshalByRefObject
     System.Threading.WaitHandle
       System.Threading.EventWaitHandle
        System.Threading.AutoResetEvent
スレッド セーフスレッド セーフ

このクラスは、スレッド セーフです。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

AutoResetEvent コンストラクタ

初期状態シグナル状態に設定するかどうかを示す Boolean 型の値を使用して、AutoResetEvent クラス新しインスタンス初期化します。

名前空間: System.Threading
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    initialState As Boolean _
)
Dim initialState As Boolean

Dim instance As New AutoResetEvent(initialState)
public AutoResetEvent (
    bool initialState
)
public:
AutoResetEvent (
    bool initialState
)
public AutoResetEvent (
    boolean initialState
)
public function AutoResetEvent (
    initialState : boolean
)

パラメータ

initialState

初期状態シグナル状態に設定する場合true初期状態を非シグナル状態に設定する場合false

使用例使用例
Imports System
Imports System.Threading

Namespace AutoResetEvent_Examples
    Class MyMainClass
        'Initially not signaled.
        Private Const numIterations As
 Integer = 100
        Private Shared myResetEvent As
 New AutoResetEvent(False)
        Private Shared number As
 Integer

        <MTAThread> _
        Shared Sub Main()
            'Create and start the reader thread.
            Dim myReaderThread As New
 Thread(AddressOf MyReadThreadProc)
            myReaderThread.Name = "ReaderThread"
            myReaderThread.Start()

            Dim i As Integer
            For i = 1 To numIterations
                Console.WriteLine("Writer thread writing value:
 {0}", i)
                number = i

                'Signal that a value has been written.
                myResetEvent.Set()

                'Give the Reader thread an opportunity to act.
                Thread.Sleep(0)
            Next i

            'Terminate the reader thread.
            myReaderThread.Abort()
        End Sub 'Main

        Shared Sub MyReadThreadProc()
            While True
                'The value will not be read until the writer has written
                ' at least once since the last read.
                myResetEvent.WaitOne()
                Console.WriteLine("{0} reading value: {1}",
 Thread.CurrentThread.Name, number)
            End While
        End Sub 'MyReadThreadProc
    End Class 'MyMainClass
End Namespace 'AutoResetEvent_Examples
using System;
using System.Threading;

namespace AutoResetEvent_Examples
{
    class MyMainClass
    {
        //Initially not signaled.
      const int numIterations = 100;
      static AutoResetEvent myResetEvent = new
 AutoResetEvent(false);
      static int number;
      
      static void Main()
        {
         //Create and start the reader thread.
         Thread myReaderThread = new Thread(new
 ThreadStart(MyReadThreadProc));
         myReaderThread.Name = "ReaderThread";
         myReaderThread.Start();

         for(int i = 1; i <= numIterations;
 i++)
         {
            Console.WriteLine("Writer thread writing value: {0}", i);
            number = i;
            
            //Signal that a value has been written.
            myResetEvent.Set();
            
            //Give the Reader thread an opportunity to act.
            Thread.Sleep(0);
         }

         //Terminate the reader thread.
         myReaderThread.Abort();
      }

      static void MyReadThreadProc()
      {
         while(true)
         {
            //The value will not be read until the writer has written
            // at least once since the last read.
            myResetEvent.WaitOne();
            Console.WriteLine("{0} reading value: {1}", Thread.CurrentThread.Name,
 number);
         }
      }
    }
}
using namespace System;
using namespace System::Threading;
ref class MyMainClass
{
public:
   static void MyReadThreadProc()
   {
      while ( true )
      {
         
         //The value will not be read until the writer has written
         // at least once since the last read.
         myResetEvent->WaitOne();
         Console::WriteLine( " {0} reading value: {1}", Thread::CurrentThread->Name,
 number );
      }
   }


   //Initially not signaled.
   static AutoResetEvent^ myResetEvent = gcnew AutoResetEvent(
 false );
   static int number;
   literal int numIterations = 100;
};

int main()
{
   
   //Create and start the reader thread.
   Thread^ myReaderThread = gcnew Thread( gcnew ThreadStart( MyMainClass::MyReadThreadProc
 ) );
   myReaderThread->Name = "ReaderThread";
   myReaderThread->Start();
   for ( int i = 1; i <= MyMainClass::numIterations;
 i++ )
   {
      Console::WriteLine( "Writer thread writing value: {0}", i );
      MyMainClass::number = i;
      
      //Signal that a value has been written.
      MyMainClass::myResetEvent->Set();
      
      //Give the Reader thread an opportunity to act.
      Thread::Sleep( 0 );

   }
   
   //Terminate the reader thread.
   myReaderThread->Abort();
}

package AutoResetEvent_Examples;

import System.*;
import System.Threading.*;
import System.Threading.Thread;

class MyMainClass
{
    //Initially not signaled.
    private final static int
 numIterations = 100;
    private static AutoResetEvent myResetEvent
 = new AutoResetEvent(false);
    private static int number;

    public static void main(String[]
 args)
    {
        //Create and start the reader thread.
        Thread myReaderThread = new Thread(new
 ThreadStart(MyReadThreadProc));
        myReaderThread.set_Name("ReaderThread");
        myReaderThread.Start();
        for (int i = 1; i <= numIterations;
 i++) {
            Console.WriteLine("Writer thread writing value: {0}",
                String.valueOf(i));
            number = i;

            //Signal that a value has been written.
            myResetEvent.Set();

            //Give the Reader thread an opportunity to act.
            Thread.Sleep(0);
        }

        //Terminate the reader thread.
        myReaderThread.Abort();
    } //main

    static void MyReadThreadProc()
    {
        while (true) {
            //The value will not be read until the writer has written
            // at least once since the last read.
            myResetEvent.WaitOne();
            Console.WriteLine("{0} reading value: {1}", 
                Thread.get_CurrentThread().get_Name(),String.valueOf(number));
        }
    } //MyReadThreadProc
} //MyMainClass
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

AutoResetEvent プロパティ


AutoResetEvent メソッド


パブリック メソッドパブリック メソッド

  名前 説明
パブリック メソッド Close  派生クラスオーバーライドされると、現在の WaitHandle で保持されているすべてのリソース解放します。 ( WaitHandle から継承されます。)
パブリック メソッド CreateObjRef  リモート オブジェクトとの通信使用するプロキシ生成必要な情報をすべて格納しているオブジェクト作成します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド GetAccessControl  現在の EventWaitHandle オブジェクトによって表される前付システム イベントアクセス制御セキュリティを表す EventWaitHandleSecurity オブジェクト取得します。 ( EventWaitHandle から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetLifetimeService  対象インスタンス有効期間ポリシー制御する現在の有効期間サービス オブジェクト取得します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド InitializeLifetimeService  対象インスタンス有効期間ポリシー制御する有効期間サービス オブジェクト取得します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド OpenExisting  オーバーロードされます既存の名前付同期イベント開きます。 ( EventWaitHandle から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド Reset  イベントの状態を非シグナル状態に設定しスレッドブロックします。 ( EventWaitHandle から継承されます。)
パブリック メソッド Set  イベントの状態をシグナル状態に設定し待機している 1 つ上のスレッド進行できるようにします。 ( EventWaitHandle から継承されます。)
パブリック メソッド SetAccessControl  前付システム イベントアクセス制御セキュリティ設定します。 ( EventWaitHandle から継承されます。)
パブリック メソッド SignalAndWait  オーバーロードされます分割不可能な操作として1 つWaitHandle通知し別の WaitHandle待機します。 ( WaitHandle から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
パブリック メソッド WaitAll  オーバーロードされます指定した配列内のすべての要素シグナル受信するまで待機します。 ( WaitHandle から継承されます。)
パブリック メソッド WaitAny  オーバーロードされます指定した配列内のいずれか要素シグナル受信するまで待機します。 ( WaitHandle から継承されます。)
パブリック メソッド WaitOne  オーバーロードされます派生クラスオーバーライドされると、現在の WaitHandleシグナル受信するまで現在のスレッドブロックします。 ( WaitHandle から継承されます。)
参照参照

関連項目

AutoResetEvent クラス
System.Threading 名前空間
WaitHandle

その他の技術情報

マネージ スレッド処理
AutoResetEvent

AutoResetEvent メンバ

イベント発生したことを待機中のスレッド通知します。このクラス継承できません。

AutoResetEvent データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
  名前 説明
パブリック メソッド Close  派生クラスオーバーライドされると、現在の WaitHandle で保持されているすべてのリソース解放します。 (WaitHandle から継承されます。)
パブリック メソッド CreateObjRef  リモート オブジェクトとの通信使用するプロキシ生成必要な情報をすべて格納しているオブジェクト作成します。 (MarshalByRefObject から継承されます。)
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド GetAccessControl  現在の EventWaitHandle オブジェクトによって表される前付システム イベントアクセス制御セキュリティを表す EventWaitHandleSecurity オブジェクト取得します。 (EventWaitHandle から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetLifetimeService  対象インスタンス有効期間ポリシー制御する現在の有効期間サービス オブジェクト取得します。 (MarshalByRefObject から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド InitializeLifetimeService  対象インスタンス有効期間ポリシー制御する有効期間サービス オブジェクト取得します。 (MarshalByRefObject から継承されます。)
パブリック メソッド OpenExisting  オーバーロードされます既存の名前付同期イベント開きます。 (EventWaitHandle から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド Reset  イベントの状態を非シグナル状態に設定しスレッドブロックします。 (EventWaitHandle から継承されます。)
パブリック メソッド Set  イベントの状態をシグナル状態に設定し待機している 1 つ上のスレッド進行できるようにします。 (EventWaitHandle から継承されます。)
パブリック メソッド SetAccessControl  前付システム イベントアクセス制御セキュリティ設定します。 (EventWaitHandle から継承されます。)
パブリック メソッド SignalAndWait  オーバーロードされます分割不可能な操作として1 つWaitHandle通知し別の WaitHandle待機します。 (WaitHandle から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
パブリック メソッド WaitAll  オーバーロードされます指定した配列内のすべての要素シグナル受信するまで待機します。 (WaitHandle から継承されます。)
パブリック メソッド WaitAny  オーバーロードされます指定した配列内のいずれか要素シグナル受信するまで待機します。 (WaitHandle から継承されます。)
パブリック メソッド WaitOne  オーバーロードされます派生クラスオーバーライドされると、現在の WaitHandleシグナル受信するまで現在のスレッドブロックします。 (WaitHandle から継承されます。)
参照参照

関連項目

AutoResetEvent クラス
System.Threading 名前空間
WaitHandle

その他の技術情報

マネージ スレッド処理
AutoResetEvent



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「AutoResetEvent」の関連用語

AutoResetEventのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



AutoResetEventのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS