Subject Re: [IBO] sharing connections beetween threads
Author Svein Erling Tysvær
I don't know if it is applicable since I've never used it, but
TIB_Connection does have a method DisconnectToPool. Maybe you are
trying to do something IBO can do for you.


> I share a pool of connection wich are initialized
> connected and stored in a list. If a thread starts
> I'm validating the connection and lock it for use
> until the thread terminates.
> I remove the lock and leave it in the list. If
> all connections are in use I create a new one and add
> it to the list.
> So at least there are as many connection than threads.
> Each thread has it's one connection for exclusive use but
> the connections are not created in the context of the thread
> itself and they are reused in different threads.
> maik
> > > Is it possible with IBO/Firebird to create a TIB_Connection
> > > in one thread and use it in another, if only one thread at a
> > > time uses it ? I'm using short running threads wich
> > > do data manipulation and don't want to create a connection
> > > everytime I start a new thread.
> > >
> > > thanks,
> > > maik
> >
> > this would mean that you are serialising the operation of these
> > threads - what's the point?
> > Alan