- Make test-python_loader a unit test instead of an integration test
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@520 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
ef733b37e8
commit
ec3361cb84
4 changed files with 82 additions and 51 deletions
|
@ -160,6 +160,8 @@ PythonPolicy::wait_unlock() const throw(UserInterruptException)
|
|||
int i = 0; // We give the sort_queue() three seconds max time, then...
|
||||
// we shot it stone dead! Bang.
|
||||
|
||||
std::cout << "waiting unlock" << std::endl;
|
||||
|
||||
bool still_locked;
|
||||
do
|
||||
{
|
||||
|
@ -172,11 +174,10 @@ PythonPolicy::wait_unlock() const throw(UserInterruptException)
|
|||
Py_DECREF(retval);
|
||||
|
||||
if(i++ > 120)
|
||||
{
|
||||
|
||||
PyThreadState_Clear(_save);
|
||||
{
|
||||
PyThreadState_Clear(_save);
|
||||
PyEval_RestoreThread(_save);
|
||||
|
||||
|
||||
//Py_UNBLOCK_THREADS;
|
||||
|
||||
throw UserInterruptException("User-defined policy is "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue