src/Pure/Thy/thy_resources.scala
changeset 68947 ea804c814693
parent 68943 e564605d4cac
child 68949 e848328cb2c1
equal deleted inserted replaced
68946:6dd1460f6920 68947:ea804c814693
    79   }
    79   }
    80 
    80 
    81   val default_check_delay = Time.seconds(0.5)
    81   val default_check_delay = Time.seconds(0.5)
    82   val default_nodes_status_delay = Time.seconds(-1.0)
    82   val default_nodes_status_delay = Time.seconds(-1.0)
    83   val default_commit_clean_delay = Time.seconds(60.0)
    83   val default_commit_clean_delay = Time.seconds(60.0)
       
    84   val default_watchdog_timeout = Time.seconds(600.0)
    84 
    85 
    85 
    86 
    86   class Session private[Thy_Resources](
    87   class Session private[Thy_Resources](
    87     session_name: String,
    88     session_name: String,
    88     session_options: Options,
    89     session_options: Options,
   194       theories: List[String],
   195       theories: List[String],
   195       qualifier: String = Sessions.DRAFT,
   196       qualifier: String = Sessions.DRAFT,
   196       master_dir: String = "",
   197       master_dir: String = "",
   197       check_delay: Time = default_check_delay,
   198       check_delay: Time = default_check_delay,
   198       check_limit: Int = 0,
   199       check_limit: Int = 0,
   199       watchdog_timeout: Time = Time.zero,
   200       watchdog_timeout: Time = default_watchdog_timeout,
   200       nodes_status_delay: Time = default_nodes_status_delay,
   201       nodes_status_delay: Time = default_nodes_status_delay,
   201       id: UUID = UUID(),
   202       id: UUID = UUID(),
   202       // commit: must not block, must not fail
   203       // commit: must not block, must not fail
   203       commit: Option[(Document.Snapshot, Document_Status.Node_Status) => Unit] = None,
   204       commit: Option[(Document.Snapshot, Document_Status.Node_Status) => Unit] = None,
   204       commit_clean_delay: Time = default_commit_clean_delay,
   205       commit_clean_delay: Time = default_commit_clean_delay,
   301               for ((theory, percentage) <- theory_percentages)
   302               for ((theory, percentage) <- theory_percentages)
   302                 progress.theory_percentage("", theory, percentage)
   303                 progress.theory_percentage("", theory, percentage)
   303 
   304 
   304               check_result()
   305               check_result()
   305 
   306 
   306               if (commit.isDefined && commit_clean_delay >= Time.zero) {
   307               if (commit.isDefined && commit_clean_delay > Time.zero) {
   307                 if (use_theories_state.value.finished_result)
   308                 if (use_theories_state.value.finished_result)
   308                   delay_commit_clean.revoke
   309                   delay_commit_clean.revoke
   309                 else delay_commit_clean.invoke
   310                 else delay_commit_clean.invoke
   310               }
   311               }
   311             }
   312             }