InternalThread() {}
virtual ~InternalThread() {}
- /** Returns true if the thread was successfully started **/
+ /** Returns true if the thread was successfully started. **/
bool StartInternalThread() {
- return pthread_create(&_thread, NULL, InternalThreadEntryFunc, this);
+ return (pthread_create(&_thread, NULL, InternalThreadEntryFunc, this) == 0);
}
/** Will not return until the internal thread has exited. */
data_transformer_.InitRand();
- CHECK(!StartInternalThread()) << "Pthread execution failed";
+ CHECK(StartInternalThread()) << "Pthread execution failed";
}
template <typename Dtype>
data_transformer_.InitRand();
// Create the thread.
- CHECK(!StartInternalThread()) << "Pthread execution failed";
+ CHECK(StartInternalThread()) << "Pthread execution failed";
}
template <typename Dtype>