Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multithreading Problem using TThread

Status
Not open for further replies.

LennyJG

Programmer
Jan 13, 2010
1
0
0
DE
Hi,
I created a descendant class of TThread, implemented the Execute function exactly as described in the C++-Builder Help. The Execute function contains a tight loop.
Now when I start the thread calling it's Execute-method, the mainwindow of the application can no longer be closed by clicking on the x-Button (upper right corner). I have to kill the application by killing its process in the taskmanager. Any idea why this is?

Thanks
Lenny
 
Without seeing your code, I'll make an assumption that the child thread is still running when you try to close the main app. You make have to implement an action that will kill all child threads when the main thread's OnClose method is called.


James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top