Subject | Re: Issue for process |
---|---|
Author | heroes3lover |
Post date | 2007-05-30T02:14:21Z |
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
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
>freeze
>
> > Thank you Adam,
> > Currently I only use Select in the thread, the reason is that
> > customers complaint about their white screen, said our program
> > their laptop, so use one thread backgroud to do select stuff, andthe
> > main process wait for the thread terminated which can get rid of
> > white screen.In fact, only one thread can running background, soI
> > can not imagine the connection can cause this problem, but I cantry.
> >Yes,
> > 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
>
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