Page 1 of 1

Is version 5 of MyDac thread-safe ?

Posted: Tue 04 Dec 2007 21:24
by CFaiga
My System is using Mydac version 4 with Midas and a has a TMyConnection per thread
Antaeus wrote:> As the MyDac isn't thread-safe ...
MyDAC can work in multithreaded applications, so it is thread safe. But the restriction is that you cannot use one component for more than one thread simultaneously.
> are rthey compatible with Midas ?
Yes, MyDAC is compatible with Midas. Please see Midas demo for example.
> what must be done to make them thread safe ?
In your case using one instanse of TMyConnection per thread must be helpful.

Does version 5 have the same problem ?

using one connection per thread my applation can use up to 16 connections per user - and that is a problem

Do you have any ideas on how I can share 1 connection to many RDMs in a Midas application ?

Posted: Wed 05 Dec 2007 08:44
by Antaeus
MyDAC 5 also requires that each TMyConnection object is used from a single thread at the same time.

Posted: Wed 05 Dec 2007 11:13
by CFaiga
Are there any plans to fix this in version 6

Posted: Wed 05 Dec 2007 13:38
by Antaeus
We will consider possibility to add this improvement.