I have a thread and in this thread I have a while. it looks something like this:
DWORD WINAPI Thread(void* lpvParam)
// Do something
The Terminated flag will be modified from another thread. My question is that should I use Critical_Section to protect the Terminated flag?