i am aborting a thread (will be threads soon enough) and the problem is i need to stall until all threads have been aborted. After doing theThread.Abort(); i thought of using theThread.Join() to wait until its been fully aborted. However that doesnt work. It just waits forever. How can i abort each thread and wait until its done before continuing?
If your curious why, in this case i am closing a window, i pass a delegate func into the thread which it calls when its done (or aborted). If i dont stall then the window will close and the function will call invalid handles/objs. I can easily use the same method, stick a flag in and loop & sleep until all flags are set but that doesnt feel right.