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

Remove atomic

上级 b4f0e579
...@@ -18,9 +18,7 @@ namespace paddle { ...@@ -18,9 +18,7 @@ namespace paddle {
namespace framework { namespace framework {
void ReaderBase::ReadNext(std::vector<LoDTensor> *out) { void ReaderBase::ReadNext(std::vector<LoDTensor> *out) {
if (status_ != ReaderStatus::kRunning) { PADDLE_ENFORCE_EQ(status_, ReaderStatus::kRunning);
PADDLE_THROW("The reader is not at the status of 'running'.");
}
ReadNextImpl(out); ReadNextImpl(out);
} }
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#pragma once #pragma once
#include <atomic>
#include <memory> #include <memory>
#include <vector> #include <vector>
...@@ -44,7 +43,7 @@ class ReaderBase { ...@@ -44,7 +43,7 @@ class ReaderBase {
virtual void StartImpl() = 0; virtual void StartImpl() = 0;
std::atomic<ReaderStatus> status_{kRunning}; ReaderStatus status_{kRunning};
}; };
class DecoratedReader : public ReaderBase { class DecoratedReader : public ReaderBase {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册