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

@@ -1453,6 +1453,8 @@ wxThreadError wxThread::Delete(ExitCode *rc)
m_critsect.Leave();
OnDelete();
switch ( state )
{
case STATE_NEW:
@@ -1501,6 +1503,8 @@ wxThreadError wxThread::Kill()
wxCHECK_MSG( This() != this, wxTHREAD_MISC_ERROR,
wxT("a thread can't kill itself") );
OnKill();
switch ( m_internal->GetState() )
{
case STATE_NEW: