File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,18 @@ class AsyncCommsWrapper : public MOOS::MOOSAsyncCommClient {
4545private:
4646 typedef MOOSAsyncCommClient BASE;
4747public:
48+
49+ ~AsyncCommsWrapper (){
50+ // AsyncCommsWrapper::Close(true);
51+ // BASE::~BASE();
52+ Py_BEGIN_ALLOW_THREADS
53+ // PyGILState_STATE gstate = PyGILState_Ensure();
54+ BASE::Close (true );
55+ // PyGILState_Release(gstate);
56+ Py_END_ALLOW_THREADS
57+
58+ }
59+
4860
4961 bool Run (const std::string & sServer , int Port, const std::string & sMyName ) {
5062 return BASE::Run (sServer , Port, sMyName , 0 );// Comms Tick not used in Async version
@@ -81,13 +93,12 @@ class AsyncCommsWrapper : public MOOS::MOOSAsyncCommClient {
8193 return true ;
8294 }
8395
84- bool Close (bool nice)
85- {
86- Py_BEGIN_ALLOW_THREADS
87- // PyGILState_STATE gstate = PyGILState_Ensure();
88- BASE::Close (nice);
89- // PyGILState_Release(gstate);
90- Py_END_ALLOW_THREADS
96+ bool Close (bool nice){
97+ Py_BEGIN_ALLOW_THREADS
98+ // PyGILState_STATE gstate = PyGILState_Ensure();
99+ this ->BASE ::~BASE ();
100+ // PyGILState_Release(gstate);
101+ Py_END_ALLOW_THREADS
91102 }
92103
93104
You can’t perform that action at this time.
0 commit comments