win32all140 - axscript InterruptScriptThread interrupts the wrong thread
Alan Klietz
alank at NOSPAM.com
Sun Jan 6 05:03:29 EST 2002
The InterruptScriptThread callback for IActiveScriptSite, implemented in
PyGActiveScript.cpp, calls PyErr_SetInterrupt(). I wrote an web server in
Python that parses ASP files, however when a python ASP script was
interrupted it would blow away the main thread instead of the script thread.
The problem is that PyErr_SetInterrupt() always reflects the interrupt back
to the main thread. Until this is fixed in the base Python distribution, it
is better to simply punt.
*** OLD\PyGActiveScript.cpp Thu Jun 21 02:05:33 2001
--- PyGActiveScript.cpp Fri Aug 03 20:39:49 2001
*************** STDMETHODIMP PyGActiveScript::InterruptS
*** 191,198 ****
/* [in] */ DWORD dwFlags
)
{
! PyErr_SetInterrupt();
! return S_OK;
}
STDMETHODIMP PyGActiveScript::Clone(
--- 191,199 ----
/* [in] */ DWORD dwFlags
)
{
! //PyErr_SetInterrupt(); // NO!! wrongly interrupts the 1st thread - AEK
! //return S_OK; // AEK
! return E_NOTIMPL; // AEK
}
STDMETHODIMP PyGActiveScript::Clone(
Alan Klietz
alank at algintech.NOSPAM.com (remove .NOSPAM)
More information about the Python-list
mailing list