I create a stream in a class method, for example:
void MyClass::startThread() { T.reset( new std::thread( &MyClass::myThreadMethod, this ) ); } void MyClass::myThreadMethod() {
Where
When I run MyClass::startThread() , I get the following:
Received Signal: SIGABRT (Aborted) ...
If I find the code, this happens in the stream constructor.
I tried removing unique_ptr as follows:
void MyClass::startThread() { std::thread* T = new std::thread( &MyClass::myThreadMethod, this ); }
and the same thing happened. I am using gcc 4.8.2 on NetBeans 7.4 on Linux / Kubuntu 12.04.
Does anyone know what is going on?
source share