Subject | RE: Re-2: [IBO] sharing connections beetween threads |
---|---|
Author | Alan McDonald |
Post date | 2004-10-19T07:43:24Z |
> I share a pool of connection wich are initializedthey don't have to be created in the context of the thread. It's quite
> 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
alright for threads to use connections which are components created at
application start up on a data module. As long as they establish the
connection and have exclusive use of the connection during the execution of
the thread.
Alan