ThradSafe connection
ThradSafe connection
Hello
i got a problem i am running an applikation in which i do connections and sending sql's in a thread. So it is possible for several clients to connect and have there sql statmens setup for each sql statment from each client in an own thread als well having an own connection to this statment and after this closing the connection in the same thread.
But now after updating to the new Version i have got the big problem that when i run one client and doing a hughe sql statment (means a lot of data's to collect) the other client stucks until the first one is finished. And i do not change anything in my applikation (checked it with SVN ). I only uninstall the old IBDAC Version from 3.5.0.17 and install the newest one.
seems to be that there is a problem in the threading method. I am sorry to could not get an example an i compared both IBDAC sources but i was not able to find the diffrent !
i got a problem i am running an applikation in which i do connections and sending sql's in a thread. So it is possible for several clients to connect and have there sql statmens setup for each sql statment from each client in an own thread als well having an own connection to this statment and after this closing the connection in the same thread.
But now after updating to the new Version i have got the big problem that when i run one client and doing a hughe sql statment (means a lot of data's to collect) the other client stucks until the first one is finished. And i do not change anything in my applikation (checked it with SVN ). I only uninstall the old IBDAC Version from 3.5.0.17 and install the newest one.
seems to be that there is a problem in the threading method. I am sorry to could not get an example an i compared both IBDAC sources but i was not able to find the diffrent !
-
AndreyZ
Hello,
The point is that we implemented the restriction of execution of several statements at once. It was done because the Firebird/Interbase dll isn't threadsafe and it doesn't allow several API calls at once. To bypass this restriction you can set the ThreadSafetyClientLibrary variable of the IBCCall unit to False. This variable is available starting with IBDAC 3.50.0.19.
The point is that we implemented the restriction of execution of several statements at once. It was done because the Firebird/Interbase dll isn't threadsafe and it doesn't allow several API calls at once. To bypass this restriction you can set the ThreadSafetyClientLibrary variable of the IBCCall unit to False. This variable is available starting with IBDAC 3.50.0.19.
-
tsteinmaurer
- Posts: 52
- Joined: Thu 17 Dec 2009 08:25
-
AndreyZ
-
AndreyZ
-
AndreyZ
The default value of the ThreadSafetyClientLibrary variable is set to True. It means that IBDAC is trying to implement thread safety by itself. If the client library is threadsafe (like in Firebird 2.5), thread safety is implemented both by IBDAC and Firebird. You can turn off the thread safety provided by IBDAC by setting the ThreadSafetyClientLibrary variable to False. In this case thread safety will be provided only by Firebird.
Starting from IBDAC version 3.50.0.20 the ThreadSafetyClientLibrary global variable is set to False by default.
IBDAC implements thread safety by itself only for non threadsafe client library. For threadsafe client library (like in Firebird 2.5) IBDAC doesn't use implementation of thread safety.
If you need, you can turn on thread safety provided by IBDAC for any client libraries by setting ThreadSafetyClientLibrary to True.
IBDAC implements thread safety by itself only for non threadsafe client library. For threadsafe client library (like in Firebird 2.5) IBDAC doesn't use implementation of thread safety.
If you need, you can turn on thread safety provided by IBDAC for any client libraries by setting ThreadSafetyClientLibrary to True.
-
tsteinmaurer
- Posts: 52
- Joined: Thu 17 Dec 2009 08:25
-
AndreyZ