Michael Van Canneyt wrote:
Hello,
I think that what you did is the only right solution. Synchronizing
threads is tricky, and the default mechanism is meant for GUI apps where
the main thread is the GUI thread.
I wish there was a way for a thread to asynchronously notify the main thread there is a
Synchronize() pending. On Linux I can insert an fd() for a pipe into the gtk event loop and poke
data into the pipe from the thread. It's incredibly efficient and saves all the waiting and polling.
I've not worked out how to do this on OSX or Win32 yet though.
Brad
--
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal