Queues a method for execution. The method executes when a thread pool thread becomes available.
Declaration Syntax
C# | Visual Basic | Visual C++ | J# |
public static bool QueueUserWorkItem( WaitCallback callback )
Public Shared Function QueueUserWorkItem ( _ callback As WaitCallback _ ) As Boolean
public: static bool QueueUserWorkItem( WaitCallback^ callback )
public static boolean QueueUserWorkItem( WaitCallback callback )
Parameters
- callback (WaitCallback)
- A System.Threading.WaitCallback that represents the method to be executed.
Return Value
true if the method is successfully queued; System.OutOfMemoryException is thrown if the work item could not be queued.