Added wxThread::OnKill() and OnDelete() callbacks.

Call OnXXX() from wxThread::Kill() and Delete() respectively to allow the
thread being terminated perform some cleanup.

Closes #9046.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-10-23 14:10:12 +00:00
parent ec2c85bf79
commit df191bfe39
5 changed files with 52 additions and 0 deletions

View File

@@ -454,6 +454,37 @@ public:
*/
virtual ExitCode Entry() = 0;
/**
Callback called by Delete() before actually deleting the thread.
This function can be overridden by the derived class to perform some
specific task when the thread is gracefully destroyed. Notice that it
will be executed in the context of the thread that called Delete() and
<b>not</b> in this thread's context.
TestDestroy() will be true for the thread before OnDelete() gets
executed.
@since 2.9.2
@see OnKill()
*/
virtual void OnDelete();
/**
Callback called by Kill() before actually killing the thread.
This function can be overridden by the derived class to perform some
specific task when the thread is terminated. Notice that it will be
executed in the context of the thread that called Kill() and <b>not</b>
in this thread's context.
@since 2.9.2
@see OnDelete()
*/
virtual void OnKill();
/**
@deprecated
Use CreateThread() instead.