HDFS-9486. Fix valgrind failures when using more than 1 io_service worker thread. Contributed by James Clampffer.
This commit is contained in:
parent
58f2c7183e
commit
c59bd00a56
@ -171,7 +171,6 @@ FileSystemImpl::~FileSystemImpl() {
|
||||
**/
|
||||
io_service_->Stop();
|
||||
worker_threads_.clear();
|
||||
io_service_.reset(nullptr);
|
||||
}
|
||||
|
||||
void FileSystemImpl::Connect(const std::string &server,
|
||||
|
@ -105,6 +105,11 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
/**
|
||||
* The IoService must be the first member variable to ensure that it gets
|
||||
* destroyed last. This allows other members to dequeue things from the
|
||||
* service in their own destructors.
|
||||
**/
|
||||
std::unique_ptr<IoServiceImpl> io_service_;
|
||||
NameNodeOperations nn_;
|
||||
const std::string client_name_;
|
||||
@ -120,8 +125,6 @@ private:
|
||||
std::vector<WorkerPtr> worker_threads_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user