Jonas Maebe wrote:
On 17 May 2010, at 16:00, Brad Campbell wrote:
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.
If you use the timeout parameter from CheckSynchronize, you do get that
effect (if you pass high(longint) as timeout, then you only "poll" if
nothing happened for 2^31 miliseconds, which is about 24 days).
Err. yeah, but doesn't checksynchronize block until either an event or the
timeout?
I'd have thought that would destroy your GUI interactivity.
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