Subject | RE: [firebird-support] Embedded for MultiThread |
---|---|
Author | Alan McDonald |
Post date | 2008-09-12T07:38:56Z |
> Alan McDonald wrote:or managed as per the recommendations of the connection components, e.g. IBO
>
> > he's asking if you can have a multi threaded app use the embedded
> driver.
> > You can create as many threads with as many connections (one per
> thread) as
> > you like with the one single loading of the embedded driver.
> > Maybe that's clearer.
>
> That's more like what I thought I knew. :-)
>
> So is this correct:
>
> 1. Embedded allows only one client instance (= "one single loading of
> the embedded driver") to connect to the server, but it can have any
> number of connections.
>
> 2. Connections should not be shared between threads, unless each use is
> protected with a critical section.
>
requires separate IB_Connection/IB_Sessions per thread - this avoids the
clumsy/risky nature of managing critical sections.
But otherwise it's identical to writing your app for a remote server
database.
Alan
> Thank you,
> Kjell