Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

attach thread to main process.

Posted on 2004-09-06
2
Medium Priority
?
380 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 2000 total points
ID: 11991089
0
 

Author Comment

by:dotnet22
ID: 11992152
Thanks.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

636 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