Original Post
Hey! As I was reading the docs about win32 threads, I found that it was possible to suspend and resume threads quite easilly calling SuspendThread and ResumeThread. Before I take a step further and try cooking something of my own, I wanted to know If someone would like to comment on the following outlines: I'll make a resource loader that will do it's job in a separate thread. Other thread will post messages to him using a thread-safe meassage queue. Those mesages will mainly consist of asking for loading/unloading file binary content into some structs, etc. And now my particular point: Instead of having the thread wait idle for some incoming message, could it possible that the thread sets itself into a suspended state, until another threads post a new message ? The thread would then resume, process the messages(s) and return to it's suspended state till next message. Do you think this is a valid approach ? (Just after I wrote this post I realised that MSDN doc mentions Suspend/Resume are not primarily meant for thread syncing. But I still would like some good folks opinions about it) Any advice on what to use instead / Any good resource or tutorial / any well-explained code sample are most welcome (I'm not looking for a librairy though) Thanks! Janta