Saturday, February 4, 2012

How a thread is created ?


First, create a new Thread Start delegate. The delegate points to a method that will be executed by the new thread. Pass this delegate as a parameter when creating a new Thread instance. Finally, call the Thread.Start method to run your method.


In Detail :


1. Create a System.Threading.Thread object.
2. Create the call back function
3. Starting the Thread




Thread newThread= new Thread(new ThreadStart (MyCallbackFunction));


                 /  \                                                      /  \
                   |         (1)                                            |          (2)




newThread.Start()


        /  \
          |        (3)











No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

#Intel #Core #i9 #Processors: A Breakdown

Intel Core i9 Processors: A Breakdown Intel's 14th Gen Core i9 series offers a range of processors designed for various use cases. Her...