未验证 提交 ee7d8b4d 编写于 作者: Y yuyang18

Refine Shutdown Impl

上级 7ca85280
...@@ -52,12 +52,10 @@ class DoubleBufferReader : public framework::DecoratedReader { ...@@ -52,12 +52,10 @@ class DoubleBufferReader : public framework::DecoratedReader {
void ReadNextImpl(std::vector<framework::LoDTensor>* out) override; void ReadNextImpl(std::vector<framework::LoDTensor>* out) override;
~DoubleBufferReader() { EndPrefetcher(); }
private: private:
void ShutdownImpl() override { void ShutdownImpl() override {
EndPrefetcher();
reader_->Shutdown(); reader_->Shutdown();
EndPrefetcher();
} }
void StartImpl() override { void StartImpl() override {
......
...@@ -48,9 +48,9 @@ class ShuffleReader : public framework::DecoratedReader { ...@@ -48,9 +48,9 @@ class ShuffleReader : public framework::DecoratedReader {
private: private:
void ShutdownImpl() override { void ShutdownImpl() override {
reader_->Shutdown();
buffer_.clear(); buffer_.clear();
iteration_pos_ = 0; iteration_pos_ = 0;
reader_->Shutdown();
} }
void StartImpl() override { void StartImpl() override {
......
...@@ -36,8 +36,6 @@ class MultiFileReader : public framework::ReaderBase { ...@@ -36,8 +36,6 @@ class MultiFileReader : public framework::ReaderBase {
void ReadNextImpl(std::vector<framework::LoDTensor>* out) override; void ReadNextImpl(std::vector<framework::LoDTensor>* out) override;
~MultiFileReader() { EndScheduler(); }
private: private:
void ShutdownImpl() override { EndScheduler(); } void ShutdownImpl() override { EndScheduler(); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册