Subject Re: Threading with embedded
Author Adam
--- In firebird-support@yahoogroups.com, Richard Wesley <hawkfish@...>
wrote:
>
> Is it possible to have two different threads talking to an embedded
> server DLL? (Different connections and transactions, of course...)
>

Yes, the embedded server is tied to the process space of the process
that launches it. Different threads (of the same process) can
therefore happily connect.

There are a few gotchas:

1) A connection is not threadsafe. Therefore each thread must have its
own connection component.

2) If you use IBX, make sure you switch off the trace flags in the
connection component. These flags cause it to wait for the main
thread, and if you are either sleeping the main thread or not pumping
Application.ProcessMessages calls, the secondary thread will hang.

Otherwise, it seems to work fine.

Adam