Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : Re: Need advice - Synapse - Connection Reset by Peer
| Subject: | Re: Need advice - Synapse - Connection Reset by Peer |
| Posted by: | "Tony Caduto" (suppo..@amsoftwaredesign.com) |
| Date: | Mon, 7 Aug 2006 07:10:06 |
Mat Ballard wrote:
> g'day theo,
>
> thanks for your reply - have downloaded your demo and will study it *very
> carefully*.
>
> As for the strange design, this is due to the following.
>
> The Win32 GUI app performs very complex and memory-intensive manipulations of
> images; crudely speaking, it does:
>
Matt,
You should consider using windows messages instead of synchronize.
What I do is create a object to contain whatever I want to send back to
the GUI from the thread and then cast the object as a integer and send
that integer back as the wparam of a message, then in the gui, cast the
integer back as the object type and get your data. Be sure to free the
object when you are finished with it.
You could also do something with a queue or stack depending on your
needs.
when data comes in you could push it into the data structure and then in
the GUI check the count and if stuff is waiting start popping it off.
A FIFO queue may work for you.
--
Tony Caduto
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql 8.x
none