Delegates for Multithreading

A couple of delegates are defined to support invoking methods . These delegates are used with asynchronous processes and multithreaded classes. The MethodInvoker class is used to create delegates for procedures that return no data and take no arguments; MethodInvoker delegates are used with the Invoke method of controls. The WaitCallback delegate is defined with a signature that takes a single Object parameter. The WaitCallback delegate is used for multithreading with the ThreadPool class. The signature of both delegates follows .

 Public Delegate Sub MethodInvoker() Public Delegate Sub WaitCallback(ByVal state as Object) 

For more information on asynchronous and multithreaded programming, read Chapter 6, which provides several examples demonstrating how to use the Invoke method and the WaitCallback delegate.



Visual Basic. NET Power Coding
Visual Basic(R) .NET Power Coding
ISBN: 0672324075
EAN: 2147483647
Year: 2005
Pages: 215
Authors: Paul Kimmel

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net