Keeping a background thread alive, even after the main application exits.
Posted on 2007-11-18
I need one of my programâ€™s background thread to keep running (will self terminate when it finishes); even when the processâ€™s main thread has terminated. I do not want/need to keep the applicationâ€™s primary thread alive.
Thread process big file (e.g. add 9 to each byte inside the file, and write it to another file)
End Main Application
2 minutes later, thread finishes processing the big file.
I am currently creating worker thread with MFCâ€™s AfxBeginThread, it will need to work with W2k, Xp,Vista (locked down)