Skip to content

Commit a08bf76

Browse files
committed
refine name
1 parent 26cfc63 commit a08bf76

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

paddle/fluid/framework/threadpool.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ void ThreadPool::TaskLoop() {
9595
}
9696
}
9797

98-
std::unique_ptr<ThreadPool> MultiStreamThreadPool::io_threadpool_(nullptr);
99-
std::once_flag MultiStreamThreadPool::io_init_flag_;
98+
std::unique_ptr<ThreadPool> ThreadPoolIO::io_threadpool_(nullptr);
99+
std::once_flag ThreadPoolIO::io_init_flag_;
100100

101-
ThreadPool* MultiStreamThreadPool::GetInstanceIO() {
102-
std::call_once(io_init_flag_, &MultiStreamThreadPool::InitIO);
101+
ThreadPool* ThreadPoolIO::GetInstanceIO() {
102+
std::call_once(io_init_flag_, &ThreadPoolIO::InitIO);
103103
return io_threadpool_.get();
104104
}
105105

106-
void MultiStreamThreadPool::InitIO() {
106+
void ThreadPoolIO::InitIO() {
107107
if (io_threadpool_.get() == nullptr) {
108108
// TODO(typhoonzero1986): make this configurable
109109
io_threadpool_.reset(new ThreadPool(FLAGS_io_threadpool_size));

paddle/fluid/framework/threadpool.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class ThreadPool {
135135
std::condition_variable completed_;
136136
};
137137

138-
class MultiStreamThreadPool : ThreadPool {
138+
class ThreadPoolIO : ThreadPool {
139139
public:
140140
static ThreadPool* GetInstanceIO();
141141
static void InitIO();
@@ -156,7 +156,7 @@ std::future<void> Async(Callback callback) {
156156

157157
template <typename Callback>
158158
std::future<void> AsyncIO(Callback callback) {
159-
return MultiStreamThreadPool::GetInstanceIO()->Run(callback);
159+
return ThreadPoolIO::GetInstanceIO()->Run(callback);
160160
}
161161

162162
} // namespace framework

0 commit comments

Comments
 (0)