- Fixed another bug with interpreter reinizialization. See bug #16

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@568 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
elvez 2006-05-05 11:21:30 +00:00
parent 2bbfdca142
commit 88831f468a
1 changed files with 3 additions and 1 deletions

View File

@ -177,9 +177,11 @@ PythonPolicy::wait_unlock() const throw(UserInterruptException)
if(i++ > 12) /* waits for WAIT_FOR * 12 microseconds == 3 secs */
{
PyThreadState_Clear(_save);
// As the API documentation says, the caller of PyEval_RestoreThread
// should NOT possess the interpreter lock
Py_UNBLOCK_THREADS;
PyEval_RestoreThread(_save);
//Py_UNBLOCK_THREADS;
throw UserInterruptException("User-defined policy is "
"taking too long to terminate.");