Name

WaitHandle

Synopsis

This class encapsulates much of the logic for dealing with synchronization handles, which allow much more fine-grained synchronization control than simple thread locking. Once you have references to one or more WaitHandle subclasses, use the shared WaitOne() or WaitAny() methods to obtain a lock on any single handle or all of the handles, respectively. The WaitOne() instance method acquires the lock for a specific WaitHandle. If a thread blocks and cannot obtain the necessary locks, it enters the ThreadState.WaitSleepJoin state until the locks can be obtained.

Public MustInherit Class WaitHandle : Inherits MarshalByRefObject : Implements IDisposable
' Public Constructors
   Public Sub New() 
' Public Shared Fields
   Public const WaitTimeout As Integer                           // =258
                  ' Protected Shared Fields
   protected Shared ReadOnly InvalidHandle As IntPtr             // =-1
                  ' Public Instance Properties
   Overridable Public Property Handle As IntPtr  
' Public Shared Methods
   Public Shared Function WaitAll(
        ByVal waitHandles As WaitHandle()) As Boolean  
   Public Shared Function WaitAll(
        ByVal waitHandles As WaitHandle(), 
        ByVal millisecondsTimeout As Integer, 
        ByVal exitContext As Boolean) As Boolean  
   Public Shared Function WaitAll(
        ByVal waitHandles As WaitHandle(), 
        ByVal timeout As TimeSpan, 
        ByVal exitContext As Boolean) As Boolean  
   Public Shared Function WaitAny(
        ByVal waitHandles As WaitHandle()) As Integer  
   Public Shared Function WaitAny( ByVal waitHandles As WaitHandle(), ByVal millisecondsTimeout As Integer, ...

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.