| 71 | class ThreadedParser : public ParserImpl<IndexType, DType> { |
| 72 | public: |
| 73 | explicit ThreadedParser(ParserImpl<IndexType, DType> *base) |
| 74 | : base_(base), tmp_(NULL) { |
| 75 | iter_.set_max_capacity(8); |
| 76 | iter_.Init([base](std::vector<RowBlockContainer<IndexType, DType> > **dptr) { |
| 77 | if (*dptr == NULL) { |
| 78 | *dptr = new std::vector<RowBlockContainer<IndexType, DType> >(); |
| 79 | } |
| 80 | return base->ParseNext(*dptr); |
| 81 | }, [base]() {base->BeforeFirst();}); |
| 82 | } |
| 83 | virtual ~ThreadedParser(void) { |
| 84 | // stop things before base is deleted |
| 85 | iter_.Destroy(); |
nothing calls this directly
no test coverage detected