Hello everybody,

I Use a C++ thread that is called from the python sides to provoke some 
activities. The calls set some booleans in the thread object and return. To 
synchrThreadClassonize the execution in the thread, the idea of me is, to give 
a 
Python Event() object as bp::object to the C++ thread, that calls the python 
"set" attribute after the related activity has finished. Maybe this code is 
clearer:

Python:
thread = wrapper.ThreadClass()
event = Event()
thread.methode(event)
event.wait()


C++:
ThreadClass::methode(bp::object event)
{
     this->myEvent = event
     ...
     methodeCalled = true
     ...
}

ThreadClass::threadLoop()
{
     ...
     if (methodeCalled) {
         ...
         this->myEvent.attr("set")();
     }

}

The application crashes. If I comment out event.wait() it doesn't crash.

Any suggestions or experiances?

Thanks a lot
Alexander
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to