| 581 | |
| 582 | template<typename TDatum, typename TDatums, typename TDatumsSP, typename TWorker> |
| 583 | bool WrapperT<TDatum, TDatums, TDatumsSP, TWorker>::tryPush(const TDatumsSP& tDatums) |
| 584 | { |
| 585 | try |
| 586 | { |
| 587 | if (!mUserWs[int(WorkerType::Input)].empty()) |
| 588 | error("Push cannot be called if an input worker was already selected.", |
| 589 | __LINE__, __FUNCTION__, __FILE__); |
| 590 | return mThreadManager.tryPush(tDatums); |
| 591 | } |
| 592 | catch (const std::exception& e) |
| 593 | { |
| 594 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 595 | return false; |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | template<typename TDatum, typename TDatums, typename TDatumsSP, typename TWorker> |
| 600 | bool WrapperT<TDatum, TDatums, TDatumsSP, TWorker>::waitAndPush(const TDatumsSP& tDatums) |