Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Apr : Re: Various TSync in tcp events
| Subject: | Re: Various TSync in tcp events |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Tue, 8 Apr 2008 10:02:47 |
"Moore" <moore@hotmail.com> wrote in message
news:47fb61a1$1@newsgroups.borland.com...
> The portion of showing in a listbox I perform it in TSync class,
> posting data not yet, I perform it in the commands OnCommand
> event directly, I don't know if this is a good option
That depends on whether your DB access is thread-safe or not. If it is not
thread-safe, then you must serialize access to the DB, whether via TIdSync
or any other synchronization technique of your choosing.
> or I should create another TSync class to perform it or perform it
> in the same TSync procedure that fills the listbox
Again, that depends on what you are trying to do exactly. Does the client
have to wait for the data to be fully processed before moving on to other
things? If not, then TIdNotify might be a better choice.
Gambit