ManualResetEventSlim.Wait 메서드

정의

현재 ManualResetEventSlim이 설정될 때까지 현재 스레드를 차단합니다.

오버로드

Wait()

현재 ManualResetEventSlim이 설정될 때까지 현재 스레드를 차단합니다.

Wait(Int32)

부호 있는 32비트 정수로 시간 간격을 측정하여 현재 ManualResetEventSlim이 설정될 때까지 현재 스레드를 차단합니다.

Wait(CancellationToken)

ManualResetEventSlim을 확인하면서 현재 CancellationToken이 신호를 받을 때까지 현재 스레드를 차단합니다.

Wait(TimeSpan)

ManualResetEventSlim으로 시간 간격을 측정하여 현재 TimeSpan이 설정될 때까지 현재 스레드를 차단합니다.

Wait(Int32, CancellationToken)

ManualResetEventSlim을 확인하면서 부호 있는 32비트 정수로 시간 간격을 측정하여 현재 CancellationToken이 설정될 때까지 현재 스레드를 차단합니다.

Wait(TimeSpan, CancellationToken)

ManualResetEventSlim을 확인하면서 TimeSpan으로 시간 간격을 측정하여 현재 CancellationToken이 설정될 때까지 현재 스레드를 차단합니다.

Wait()

Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs

현재 ManualResetEventSlim이 설정될 때까지 현재 스레드를 차단합니다.

public:
 void Wait();
public void Wait ();
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public void Wait ();
member this.Wait : unit -> unit
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
member this.Wait : unit -> unit
Public Sub Wait ()
특성

예외

최대 대기자 개수를 초과했습니다.

개체가 이미 삭제되었습니다.

설명

이 메서드의 호출자는 현재 instance 설정될 때까지 무기한 차단됩니다. 이벤트가 현재 설정된 상태인 경우 호출자는 즉시 반환됩니다.

추가 정보

적용 대상

Wait(Int32)

Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs

부호 있는 32비트 정수로 시간 간격을 측정하여 현재 ManualResetEventSlim이 설정될 때까지 현재 스레드를 차단합니다.

public:
 bool Wait(int millisecondsTimeout);
public bool Wait (int millisecondsTimeout);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public bool Wait (int millisecondsTimeout);
member this.Wait : int -> bool
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
member this.Wait : int -> bool
Public Function Wait (millisecondsTimeout As Integer) As Boolean

매개 변수

millisecondsTimeout
Int32

대기할 시간(밀리초)이거나, 무기한 대기할 경우 Infinite(-1)입니다.

반환

ManualResetEventSlim가 설정되었으면 true이고, 그렇지 않으면 false입니다.

특성

예외

millisecondsTimeout이 시간 제한 없음을 나타내는 -1 이외의 음수인 경우

최대 대기자 개수를 초과했습니다.

개체가 이미 삭제되었습니다.

추가 정보

적용 대상

Wait(CancellationToken)

Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs

ManualResetEventSlim을 확인하면서 현재 CancellationToken이 신호를 받을 때까지 현재 스레드를 차단합니다.

public:
 void Wait(System::Threading::CancellationToken cancellationToken);
public void Wait (System.Threading.CancellationToken cancellationToken);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public void Wait (System.Threading.CancellationToken cancellationToken);
member this.Wait : System.Threading.CancellationToken -> unit
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
member this.Wait : System.Threading.CancellationToken -> unit
Public Sub Wait (cancellationToken As CancellationToken)

매개 변수

cancellationToken
CancellationToken

확인할 CancellationToken입니다.

특성

예외

최대 대기자 개수를 초과했습니다.

cancellationToken이 취소되었습니다.

개체가 이미 삭제되었거나 cancellationToken을 만든 CancellationTokenSource가 삭제되었습니다.

cancellationToken이 취소되었습니다.

설명

이 메서드의 호출자는 현재 instance 설정될 때까지 무기한 차단됩니다. 이벤트가 현재 설정된 상태인 경우 호출자는 즉시 반환됩니다.

추가 정보

적용 대상

Wait(TimeSpan)

Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs

ManualResetEventSlim으로 시간 간격을 측정하여 현재 TimeSpan이 설정될 때까지 현재 스레드를 차단합니다.

public:
 bool Wait(TimeSpan timeout);
public bool Wait (TimeSpan timeout);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public bool Wait (TimeSpan timeout);
member this.Wait : TimeSpan -> bool
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
member this.Wait : TimeSpan -> bool
Public Function Wait (timeout As TimeSpan) As Boolean

매개 변수

timeout
TimeSpan

대기할 시간(밀리초)을 나타내는 TimeSpan이거나, 무한 대기하도록 -1밀리초를 나타내는 TimeSpan입니다.

반환

ManualResetEventSlim가 설정되었으면 true이고, 그렇지 않으면 false입니다.

특성

예외

timeout은 시간 제한이 없음을 나타내는 -1밀리초 이외의 음수입니다.

또는

의 밀리초 timeout 수가 Int32.MaxValue보다 큽니다.

최대 대기자 개수를 초과했습니다.

개체가 이미 삭제되었습니다.

추가 정보

적용 대상

Wait(Int32, CancellationToken)

Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs

ManualResetEventSlim을 확인하면서 부호 있는 32비트 정수로 시간 간격을 측정하여 현재 CancellationToken이 설정될 때까지 현재 스레드를 차단합니다.

public:
 bool Wait(int millisecondsTimeout, System::Threading::CancellationToken cancellationToken);
public bool Wait (int millisecondsTimeout, System.Threading.CancellationToken cancellationToken);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public bool Wait (int millisecondsTimeout, System.Threading.CancellationToken cancellationToken);
member this.Wait : int * System.Threading.CancellationToken -> bool
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
member this.Wait : int * System.Threading.CancellationToken -> bool
Public Function Wait (millisecondsTimeout As Integer, cancellationToken As CancellationToken) As Boolean

매개 변수

millisecondsTimeout
Int32

대기할 시간(밀리초)이거나, 무기한 대기할 경우 Infinite(-1)입니다.

cancellationToken
CancellationToken

확인할 CancellationToken입니다.

반환

ManualResetEventSlim가 설정되었으면 true이고, 그렇지 않으면 false입니다.

특성

예외

millisecondsTimeout이 시간 제한 없음을 나타내는 -1 이외의 음수인 경우

최대 대기자 개수를 초과했습니다.

개체가 이미 삭제되었거나 cancellationToken을 만든 CancellationTokenSource가 삭제되었습니다.

cancellationToken이 취소되었습니다.

추가 정보

적용 대상

Wait(TimeSpan, CancellationToken)

Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs
Source:
ManualResetEventSlim.cs

ManualResetEventSlim을 확인하면서 TimeSpan으로 시간 간격을 측정하여 현재 CancellationToken이 설정될 때까지 현재 스레드를 차단합니다.

public:
 bool Wait(TimeSpan timeout, System::Threading::CancellationToken cancellationToken);
public bool Wait (TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public bool Wait (TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.Wait : TimeSpan * System.Threading.CancellationToken -> bool
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
member this.Wait : TimeSpan * System.Threading.CancellationToken -> bool
Public Function Wait (timeout As TimeSpan, cancellationToken As CancellationToken) As Boolean

매개 변수

timeout
TimeSpan

대기할 시간(밀리초)을 나타내는 TimeSpan이거나, 무한 대기하도록 -1밀리초를 나타내는 TimeSpan입니다.

cancellationToken
CancellationToken

확인할 CancellationToken입니다.

반환

ManualResetEventSlim가 설정되었으면 true이고, 그렇지 않으면 false입니다.

특성

예외

timeout은 시간 제한이 없음을 나타내는 -1밀리초 이외의 음수입니다.

또는

의 밀리초 timeout 수가 Int32.MaxValue보다 큽니다.

최대 대기자 개수를 초과했습니다.

개체가 이미 삭제되었거나 cancellationToken을 만든 CancellationTokenSource가 삭제되었습니다.

cancellationToken이 취소되었습니다.

추가 정보

적용 대상