BugFix: give time to Save on exit and stop recordings on Quit

This commit is contained in:
Bruno Herbelin
2022-01-16 19:16:51 +01:00
parent e52785a8b4
commit e96444671e
7 changed files with 74 additions and 35 deletions

View File

@@ -66,13 +66,13 @@ const std::chrono::milliseconds timeout_ = std::chrono::milliseconds(4);
// static multithreaded session saving
static void saveSession(const std::string& filename, Session *session, bool with_version)
{
// lock access while saving
session->lock();
// capture a snapshot of current version if requested
if (with_version)
Action::manager().snapshot( SystemToolkit::date_time_string());
// lock access while saving
session->lock();
// save file to disk
if ( SessionVisitor::saveSession(filename, session) ) {
// all ok