| 131 | |
| 132 | template<typename TDatums, typename TWorker> |
| 133 | void Thread<TDatums, TWorker>::startInThread() |
| 134 | { |
| 135 | try |
| 136 | { |
| 137 | opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 138 | stopAndJoin(); |
| 139 | *spIsRunning = true; |
| 140 | mThread = {std::thread{&Thread::threadFunction, this}}; |
| 141 | } |
| 142 | catch (const std::exception& e) |
| 143 | { |
| 144 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | template<typename TDatums, typename TWorker> |
| 149 | void Thread<TDatums, TWorker>::stopAndJoin() |