SIGN UP MEMBER LOGIN:    
ARTICLE

Steps involved in Thread lifecycle

Posted by Shinuraj Articles | C# Language April 12, 2011
Steps involved in Thread lifecycle
Reader Level:

Here is the different steps involved in creating a new thread to run a thread.

Step 1: writes a class with some methods.
 
        Class TestingThread
        {
             Public static void SendMail()
             { 
               //Write the code to send mail
             }
        }

Step 2: Write  a ThreadStart delegate and point the address of SendMail. 

ThreadStart ts=new ThreadStart(TestingThread.SendMail()) 

Step 3: Create a thread

Thread t=new Thread(ts); 

Step 4: finally start the Threads.

t.Start();

Login to add your contents and source code to this article
share this article :
post comment
 

Shinuraj, above article taken from "http://www.roseindia.net/java/thread/life-cycle-of-threads.shtml"? Are both these articles belongs to you?

Posted by Suthish Nair Apr 13, 2011

Good article

Posted by Dinesh Beniwal Apr 13, 2011
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Nevron Gauge for SharePoint
Become a Sponsor