[fpc-devel] [Solved] Strange behaviour with Synapse
Ludo Brands
ludo.brands at free.fr
Sun Mar 17 14:19:13 CET 2013
>
> Thank you for all the advices. I just removed TDownloadDeamon
> thread to merge it with TDownloader. And it works ! I still have to
> work on status/progress system which is a bit messy. If you are
> interested, I've just commited the changes in the svn repo.
>
> Thank you again,
>
I noticed you are now calling Application.ProcessMessages in
TDownloader.SockStatus. You shouldn't make that call from a thread. It
will try to handle the messages from the thread. Perhaps the widget
set has some protection for that and will ignore calls coming from
anything but the main thread but I doubt it. It'll cause sooner or
later big problems.
Get your GUI stuff out of the download thread. It pays to have clean
and understandable threads.
Ludo
More information about the fpc-devel
mailing list