Threaded TOracleQuery

cadotp

Member
Context: Windows 95b - Delphi4 UP3 - DOA 3.3 - Oracle 8.1.5

When a query is executed with
.Threaded := True;
.ThreadSynchronized := False;
properties, a thread is created.

When the query ended, OnThreadFinished event is generated. OK.
The thread should be finished and it should be destroyed. But it seems to be still alive. Even if I destroy my query (using .Free method), the thread is still alive. I can see processes threads with 'Wintop' tool.

When ThreadSynchronized property is set to True, the thread is created and correctly destroyed : it does not appear any more in my process threads list.

Is it a bug ? Do I have to kill the thread by myself ? How ?

To thread an OracleQuery, I actually use TThread class which is more complex than managing only one property. But what a pity not to be able to use DOA internal capabilities...
 
The thread of the query is created when it is first executed in threaded mode, is suspended when no action is performed by the query, and is freed when the query is freed.

------------------
Marco Kalter
Allround Automations
 
Originally posted by mkalter:
The thread of the query is created when it is first executed in threaded mode, is suspended when no action is performed by the query, and is freed when the query is freed.


The mkalter's explication is wrong.
I have done a free on the TOracleQuery (Threaded := True) but the thread is still alive.
I need a solution to destroy the thread owned by the TOracleQuery.

Thanks in advance
 
My explanation is correct. The thread is freed when the TOracleQuery is freed. If the TOracleQuery instance is freed successfully in your situation, then maybe there are other causes for the symptoms you are noticing.

------------------
Marco Kalter
Allround Automations
 
Back
Top