Threading Questions

vinnie881

Well-known member
Joined
Sep 3, 2006
Messages
152
Programming Experience
3-5
I am a new to threading. I have built my application and it works well, but here are some issues I am hopping someone can help me with.

1. How to stop a thread saftly (I don't want to stop it if it's in the middle of running something vital)

2. Catch a event (Like when my thread has finished running)

3. Handle Exceptions

Any help would be greatly appricaited.


Thanks

Also, I was looking for a threading category on this forum, but I couldn't find it. I appologize if I posted this in the wront category.
 
Wow... I so overcomplicated this.

I was always under the impression for some reason that when a thread is started to run for a specific class, that it basically takes a snapshot of all the variables and their values, then runs as a seperate entiry (Meaning that if I did a call like c.Cancel2 = true while the thread was already running, that it wouldn't referance it because it would referance the snapshot value for cancel, and not recognize I have changed it (It appears I'm wrong, and wasted a lot of time). Thanks a lot for helping.
 
Back
Top