Solved

attach thread to main process.

Posted on 2004-09-06
2
353 Views
Last Modified: 2006-11-17
How can I add  a thread to the existing process. So for instance, if I do the following

// thread created from main application.
Thread alarmTimer = new Thread(new ThreadStart(alarmEventHandler));
alarmTimer.Start();
alarmTimer.Join(0);

then the alarmTimer thread is not destroyed when the main process or application is destroyed... So what I want to happen is to be able to create a separate thread but have it terminate when the main thread or process or application that it was created from terminates? So imagine you have a windows form and create a thread from it, then you would want this new thread to terminate when the form terminates...
0
Comment
Question by:dotnet22
2 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 500 total points
ID: 11991089
0
 

Author Comment

by:dotnet22
ID: 11992152
Thanks.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now