| 257 | |
| 258 | template <class T> |
| 259 | static inline typename T::TValueType* Impl(T& t, const char* op, bool check = true) { |
| 260 | if (!t) { |
| 261 | ythrow yexception() << "can not " << op << " dead thread"; |
| 262 | } |
| 263 | |
| 264 | if (t->Running() != check) { |
| 265 | static const char* const msg[] = {"running", "not running"}; |
| 266 | |
| 267 | ythrow yexception() << "can not " << op << " " << msg[check] << " thread"; |
| 268 | } |
| 269 | |
| 270 | return t.Get(); |
| 271 | } |
| 272 | } // namespace |
| 273 | |
| 274 | class TThread::TImpl: public TThreadBase { |
no test coverage detected