FIX: use thread stack to keep shared ref of PrinterFileSystem

Change-Id: I86dce263f43eb65074d4fec777cb08885505b7cf
(cherry picked from commit 1dbc32b2335c33831ac94a787c8e7ec7d898ccba)
This commit is contained in:
chunmao.guo 2022-09-27 13:11:01 +08:00 committed by Lane.Wei
parent e228e72db1
commit 35bb20b2cf
5 changed files with 19 additions and 11 deletions

View file

@ -6024,8 +6024,10 @@ private:
boost::posix_time::ptime start;
};
private:
_BBS_Backup_Manager() : m_thread(boost::ref(*this)) {
_BBS_Backup_Manager() {
m_next_backup = boost::get_system_time() + boost::posix_time::seconds(m_interval);
boost::unique_lock lock(m_mutex);
m_thread = std::move(boost::thread(boost::ref(*this)));
}
~_BBS_Backup_Manager() {