Simple question about running threads
Posted on 2006-04-29
I am pretty new at trying to use threads, but for someone with a little more experience this should be a very easy question to answer. In my application I have a method that runs a pretty intensive process. It is a pretty long method and has already been written. Now, if I start a new thread and in that thread I call this method, is this method running in a seperate thread or is it still being run by my application? Example:
// A lot of processing here.
UINT CTestDlg::MyThread(LPVOID pParam)
CTest* pView = (CTest*)pParam;
I am wondering because doing it this way my application window is pretty slow responding during the processing. I thought that running something as a seperate thread runs the function in the background and woudnt affect my application much, but I'm not sure if Run() is running as a seperate thread or if MyThread() is just calling Run() and my application is still doing all of that processing. Can anyone answer this for me? Thanks.