Subject | Re: [IBO] Multi-threaded programs |
---|---|
Author | Helen Borrie |
Post date | 2007-06-22T14:53:27Z |
At 11:45 PM 22/06/2007, you wrote:
IB_Connection, IB_Transactions and statements. None should cross
over into other threads, including the main thread.
thread instance into its own datamodule[s] and have them created and
destroyed per thread. Don't reference *anything* across thread boundaries.
the thread is the first thing in the creation order.
Don't use the default IB_Session anywhere in your app. Ensure that
your main thread has its own explicit IB_Session that is created
completely FIRST.
Helen
>I need to add a separate thread to one of my programs to allow a longYou need to create a completely isolated structure of an IB_Session,
>running update to take place while the user continues to work in the
>foreground. What is the best way to set up the background thread?
>
>Do I need a separate IB_Connection object for the background thread or
>will a separate IB_Transaction be sufficient?
IB_Connection, IB_Transactions and statements. None should cross
over into other threads, including the main thread.
>Should the IBObjects components for the background thread be in theirNot. Total isolation. Put all the stuff that will be used by a
>own TDataModule or can the reside in the same TDataModule as the one
>for the foreground thread?
thread instance into its own datamodule[s] and have them created and
destroyed per thread. Don't reference *anything* across thread boundaries.
>Anything else that you can recommend that I haven't mentioned?In case it has slipped you mind, take care that the IB_Session for
the thread is the first thing in the creation order.
Don't use the default IB_Session anywhere in your app. Ensure that
your main thread has its own explicit IB_Session that is created
completely FIRST.
Helen