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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user