fix incoherency between the wxThread implementation based on MSW threads and pthread: Delete()ing a thread which hasn't started yet must return wxTHREAD_MISC_ERROR
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1476,6 +1476,11 @@ wxThreadError wxThread::Delete(ExitCode *rc)
|
|||||||
}
|
}
|
||||||
//else: can't wait for detached threads
|
//else: can't wait for detached threads
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state == STATE_NEW)
|
||||||
|
return wxTHREAD_MISC_ERROR;
|
||||||
|
// for coherency with the MSW implementation, signal the user that
|
||||||
|
// Delete() was called on a thread which didn't start to run yet.
|
||||||
|
|
||||||
return wxTHREAD_NO_ERROR;
|
return wxTHREAD_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user