Print Thread
Threaded TOracleQuery
#297 02/02/00 08:03 PM
Joined: Jan 2000
Posts: 9
France
C
cadotp Offline OP
Member
OP Offline
Member
C
Joined: Jan 2000
Posts: 9
France
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...

Re: Threaded TOracleQuery
#298 02/12/00 12:02 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
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


Marco Kalter
Allround Automations
Re: Threaded TOracleQuery
#299 08/24/01 07:11 PM
Joined: Aug 2001
Posts: 2
FRANCE
F
Member
Offline
Member
F
Joined: Aug 2001
Posts: 2
FRANCE
[quote]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.


[/quote]

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

Re: Threaded TOracleQuery
#300 08/30/01 04:13 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
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


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.031s Queries: 13 (0.010s) Memory: 2.5132 MB (Peak: 3.0427 MB) Data Comp: Off Server Time: 2024-05-17 06:25:28 UTC
Valid HTML 5 and Valid CSS