Add and use the wxPyThreadBlocker class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-05-30 03:24:34 +00:00
parent 209b24057c
commit 787cfb858e
19 changed files with 101 additions and 122 deletions

View File

@@ -40,7 +40,7 @@ void wxPyCallback::EventThunker(wxEvent& event) {
PyObject* tuple;
bool checkSkip = false;
wxPyBlock_t blocked = wxPyBeginBlockThreads();
wxPyThreadBlocker blocker;
wxString className = event.GetClassInfo()->GetClassName();
arg = wxPyConstructObject((void*)&event, className);
@@ -59,5 +59,4 @@ void wxPyCallback::EventThunker(wxEvent& event) {
}
Py_DECREF(tuple);
}
wxPyEndBlockThreads(blocked);
}