I have a second thread which is a timer thread. Basically it just does this
while (not Terminated) do
begin
Synchronize(@UpdateGui);
sleep(100);
end;
This causes some code to poll other stuff, in other threads, so that the gui can control them and update results etc.
The problem has been that occasionally this thread would not terminate. I tracked it down (I think) to a procedure that was called by the polling thing which had an fpgApplication.ProcessMessages in it.
It seems that sometimes when the thread is terminated it just stalls on the fpgApplication.ProcessMessages rather than quitting out. It never seems to cause a problem at any other time.
Can anyone shed any light on this?