Subject | Re: Threading with embedded |
---|---|
Author | Adam |
Post date | 2006-04-11T23:55:32Z |
--- In firebird-support@yahoogroups.com, Richard Wesley <hawkfish@...>
wrote:
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
wrote:
>Yes, the embedded server is tied to the process space of the process
> Is it possible to have two different threads talking to an embedded
> server DLL? (Different connections and transactions, of course...)
>
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