Subject | Re: [IBO] How make thread safe? |
---|---|
Author | a_kassasys |
Post date | 2005-10-06T07:12:04Z |
--- In IBObjects@yahoogroups.com, "Alan McDonald" <alan@m...> wrote:
I did upload, see Files:
sample_multi_Threads_error.zip
descr "standart sample multi Threads- safe mode?"
all into datamodule, but try it self.
> > --- In IBObjects@yahoogroups.com, "Alan McDonald" <alan@m...>wrote:
> > > > How I can check, that I use a client DLL (gds32.dll) in threadfreeze - you'll
> > safe?
> > > > If not in thread-safe, how make in safe-mode?
> > > >
> > > > I try sample in Samples, but these examples do not work, the
> > > > application is blocked (freezes) nothing also occurs: (
> > > >
> > > > Is it mean, non-safe thread?
> > > >
> > >
> > > the client library is not thread safe. You need a separate
> > connection for
> > > each thread to make it safe. Or you need to ensure that no 2
> > threads use the
> > > same connection simultaneously
> >
> > Each thread have
> > IB_Session:TIB_Session;
> > IB_Connection: TIB_Connection;
> > Transaction: TIB_Transaction;
> > FIB_Script: TIB_Script;
> > FQuery: TIB_Query;
> >
> > and making diffrent connection
> > if I make only one thread - all working,
> > if use 2 or more threads - server freezes :(
> >
>
> somethig is wrong here - there's no reason for the server to
> have to look more closely at your code.you
> I assume you manually create these components inside each thread...
> don't rely on components on a form.. the VCL is not completelythread safe
> either. If they are on a form, they are being created oustide thethread.
I did upload, see Files:
sample_multi_Threads_error.zip
descr "standart sample multi Threads- safe mode?"
all into datamodule, but try it self.