Subject | Re-2: [IBO] sharing connections beetween threads |
---|---|
Author | mw@wobe-team.com |
Post date | 2004-10-19T07:24:50Z |
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
-------- Original Message --------
Subject: RE: [IBO] sharing connections beetween threads (19-Okt-2004 9:15)
From: alan@...
To: mw@...
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
-------- Original Message --------
Subject: RE: [IBO] sharing connections beetween threads (19-Okt-2004 9:15)
From: alan@...
To: mw@...
>
> > 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
>
>
>
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> To: IBObjects@yahoogroups.com