Client side freezing

Client side freezing

Post by Vu D » Sat, 28 Feb 2004 05:34:38



I'm using TidTCPServer and TidTCPClient for a client server
setup in my D7 Indy 9.0.14 "non-snapshot". I'm connecting fine
and able to transfer data. My problem is that when the client
is processing data, it freezes up the form. Is this becuase I'm
processing the data transfer through the main thread? Should I
create a new thread and process the data transfer in that thread
instead?

I've tried to add a TidAntiFreeze component to my form but this
didn't work. The help indicates that TidAntiFreeze only works
when processing is done on the main thread. Does this mean I'm
not processing in the main thread or is something else going on?

I just wanted to rule out Indy because I do have other stuff
running in the app that is apart of the processing, ie SSL
encryption and a query through the connection. My solution
could be so simple as a ProcessMessages but I just wanted to
make sure.

Thanks,
Vu Do
 
 
 

Client side freezing

Post by Team » Sat, 28 Feb 2004 05:56:54


That version has not been updated in a long time. You should consider using
the snapshot instead.


Yes.


That is one option available.


Just saying "it doesn't work" says nothing at all about th actual problem
you are having.

It should work fine. TIdAntiFreeze is specifically designed for this exact
purpose.


Something else is going on.


That is what TIdAntiFreeze already does internally.


Gambit

 
 
 

Client side freezing

Post by Vu D » Sat, 28 Feb 2004 06:08:52


I was going to wait for 10 but I may have to get the snapshot
for this problem just in case.


Sorry, that's what I get for copying and pasting. The specifics
got lost. The form refreshes but does not allow any other
window's processing. I've got a tabbed notebook on the form.
With the TIdAntiFreeze and after a focus away from the app and
back again, I can see the tabbed notebook but I cannot click
and use it. If I do the same thing without the TIdAntiFreeze
and put in an Application.ProcessMessages, then I can use the
tabbed notebook while the process is still running.

By the way, my "process" that is running is a query that is
launched through the TCPConnection about 100 times with an
Application.ProcessMessages in between each query. I may not
be talking apples to apples when using the ProcessMessages and
the TIdAntiFreeze. The TIdAntiFreeze sounds more like what I
need.

Thanks,
Vu Do
 
 
 

Client side freezing

Post by Vu D » Sat, 28 Feb 2004 06:48:08


Ok, I had a brainfart. I usually will show my code and state
what the problem is. I was about to copy my code in when I
noticed... where the heck is the TIdAntiFreeze.Process? My bad. BTW, I did pick up the snapshot version and there was no difference in the idAntiFreeze.pas file as I expected.

Thanks,
Vu Do
 
 
 

Client side freezing

Post by Team » Sat, 28 Feb 2004 17:14:42


Indy calls it internally automatically when needed, if TIdAntiFreeze is
present and enabled.


Gambit