On 12/12/2007, Razvan Adrian Bogdan <[EMAIL PROTECTED]> wrote: > The synchronize method is simple but inefficient, it pauses your > thread until the main thread has time to execute your code and could > take some time until it does, i personally also dislike the fact that
Ah okay I see what you mean. If the thread doesn't need to communicate with the main GUI thread, it will run perfectly. As soon as it has to talk to the main GUI thread it has to use Synchronize, which might be delayed by a very busy GUI thread. So what if the worker thread posts a custom message to say the windows message queue. Surely that wouldn't cause the thread to be suspended. The GUI control then simply needs to know about the custom message, to process it correctly. Could this work, well on Windows at least? Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
