Better alternative to Application.ProcessMessages?
Posted on 2009-12-18
My first question, so I hope I am doing it correctly! I'm not sure how much or how little detail to give...
I need some guidance - I have a list of tasks that must be performed in order. Each task instruction is sent to a separate worker thread for processing. The sequence must wait for the preceding task to complete before moving on to the next one. I currently have a flag set by the worker thread when the task is done, and the list waits for this flag in an "application.processmessages" loop, before moving on to the next task. It works, but I can't help but feel there is a better way. Can someone suggest a better approach?