In Restart Thread win32.cxx
PAssert(IsTerminated(), "Cannot restart running thread");
here close old handle.....
threadHandle = (HANDLE)_beginthreadex(NULL,
MainFunction, this, 0, &threadId);
threadHandle = CreateThread(NULL, originalStackSize,
this, 0, (LPDWORD) &threadId);
PAssertOS(threadHandle != NULL);
I think that you should call CloseHandle to free system
resource of previous started thread.
Log in to post a comment.