Critical Sections, destroying
Hi, I'm starting to work with simple threads now, but I'm having trouble figuring out how to delete my critical sections properly. I have 2 threads, one for handling network stuff, and the other for handling the GUI, since the redrawing slows to a crawl when lots of users are connected. My problem is, if the program quits and the main thread deletes the critical section before all the GUI-thread code is done, I might cause the GUI thread to block forever or something as it waits to enter the critical section. Will I need to change all of my GUI thread calls to TryEnterCriticalSection() instead of just enter?