From cdaefe5f485b670cdc7823b3cb6fbf13b414d94a Mon Sep 17 00:00:00 2001 From: abd Date: Fri, 29 Jun 2007 12:46:09 +0000 Subject: [PATCH] Restore Windows python debug workaround. Now Windows Version is supporting several study in one session. --- src/Container/Container_i.cxx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 905a648b7..412b79b50 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -185,15 +185,19 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, if (!_isSupervContainer) { #ifdef WNT - //Py_ACQUIRE_NEW_THREAD; - PyEval_AcquireLock(); - /* It should not be possible for more than one thread state - to be used for a thread.*/ - PyThreadState *myTstate = PyGILState_GetThisThreadState(); - // if no thread state defined - if ( !myTstate ) - myTstate = PyThreadState_New(KERNEL_PYTHON::_interp); - PyThreadState *myoldTstate = PyThreadState_Swap(myTstate); +// //Py_ACQUIRE_NEW_THREAD; +// PyEval_AcquireLock(); +// /* It should not be possible for more than one thread state +// to be used for a thread.*/ +// PyThreadState *myTstate = PyGILState_GetThisThreadState(); +// // if no thread state defined +// if ( !myTstate ) +// myTstate = PyThreadState_New(KERNEL_PYTHON::_interp); +// PyThreadState *myoldTstate = PyThreadState_Swap(myTstate); + + PyEval_AcquireLock(); + PyThreadState *myTstate = PyThreadState_New(KERNEL_PYTHON::_interp); + PyThreadState *myoldTstate = PyThreadState_Swap(myTstate); #else Py_ACQUIRE_NEW_THREAD; #endif -- 2.39.2