I thought it was a good read. I hadn't considered that a thread might get paused before releasing a mutex lock.
For example, even if your thread has no mutex locks a function you're calling may. LoadLibrary/OpenLibrary for example will deadlock if it doesn't return and you try to open another library in a different thread.
It's best to signal your thread to suspend from the inside and resume from outside.
http://blogs.msdn.com/oldnewthing/archi ... 55988.aspx
Why you should never suspend a thread
- Psychophanta
- Always Here

- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
