Subject Re: Issue for process
Author heroes3lover
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
>
>
> > Thank you Adam,
> > Currently I only use Select in the thread, the reason is that
> > customers complaint about their white screen, said our program
freeze
> > their laptop, so use one thread backgroud to do select stuff, and
> > main process wait for the thread terminated which can get rid of
the
> > white screen.In fact, only one thread can running background, so
I
> > can not imagine the connection can cause this problem, but I can
try.
> >
> > Regards,
> > Roc
> >
>
> I should also mention that some components have SQLMonitors. IBX for
> example doesn't do anything if you have the traceflags set but sleep
> the main thread. You need to either constantly poll
> Application.ProcessMessages or turn off the trace flags. Perhaps you
> may be seeing something like this?
>
> Adam
>

Yes,
You see this function resume the thread, in order to make sure my
main process response to the windows message, I already constantly
processmessages,and the component I use is TSQLQuery, looks like no
trace flag.

function ProcessDataThread( dataThread : TDataThread ):Boolean;
begin
Result := TRUE;
dataThread.Resume;
while not dataThread.Terminated do
begin
Application.ProcessMessages;
Sleep(5);
end;
end;

Thank you very much
Roc