clarified signature;
authorwenzelm
Sun, 02 Jul 2023 18:56:52 +0200
changeset 78242 633ae08625d1
parent 78241 39e1562e69cd
child 78243 0e221a8128e4
clarified signature;
src/Pure/System/progress.scala
src/Pure/Tools/build_process.scala
--- a/src/Pure/System/progress.scala	Sun Jul 02 15:39:51 2023 +0200
+++ b/src/Pure/System/progress.scala	Sun Jul 02 18:56:52 2023 +0200
@@ -287,13 +287,14 @@
     if (context_uuid == _agent_uuid) Progress.Data.vacuum(db)
   }
 
-  def exit(): Unit = synchronized {
+  def exit(close: Boolean = false): Unit = synchronized {
     if (_context > 0) {
       Progress.Data.transaction_lock(db) {
         Progress.Data.update_agent(db, _agent_uuid, _seen, stop = true)
       }
       _context = 0
     }
+    if (close) db.close()
   }
 
   private def sync_database[A](body: => A): A = synchronized {
--- a/src/Pure/Tools/build_process.scala	Sun Jul 02 15:39:51 2023 +0200
+++ b/src/Pure/Tools/build_process.scala	Sun Jul 02 18:56:52 2023 +0200
@@ -883,8 +883,7 @@
     Option(_host_database).flatten.foreach(_.close())
     progress match {
       case db_progress: Database_Progress =>
-        db_progress.exit()
-        db_progress.db.close()
+        db_progress.exit(close = true)
       case _ =>
     }
   }