src/Pure/System/progress.scala
changeset 79717 da4e82434985
parent 78876 4222955f3b69
child 79729 bf377e10ff3b
equal deleted inserted replaced
79716:f33d37c171a9 79717:da4e82434985
   272   base_progress: Progress,
   272   base_progress: Progress,
   273   input_messages: Boolean = false,
   273   input_messages: Boolean = false,
   274   output_stopped: Boolean = false,
   274   output_stopped: Boolean = false,
   275   kind: String = "progress",
   275   kind: String = "progress",
   276   hostname: String = Isabelle_System.hostname(),
   276   hostname: String = Isabelle_System.hostname(),
   277   context_uuid: String = UUID.random().toString,
   277   context_uuid: String = UUID.random_string(),
   278   timeout: Option[Time] = None)
   278   timeout: Option[Time] = None)
   279 extends Progress {
   279 extends Progress {
   280   database_progress =>
   280   database_progress =>
   281 
   281 
   282   override def now(): Date = db.now()
   282   override def now(): Date = db.now()
   297   private def init(): Unit = synchronized {
   297   private def init(): Unit = synchronized {
   298     Progress.private_data.transaction_lock(db, create = true, label = "Database_Progress.init") {
   298     Progress.private_data.transaction_lock(db, create = true, label = "Database_Progress.init") {
   299       Progress.private_data.read_progress_context(db, context_uuid) match {
   299       Progress.private_data.read_progress_context(db, context_uuid) match {
   300         case Some(context) =>
   300         case Some(context) =>
   301           _context = context
   301           _context = context
   302           _agent_uuid = UUID.random().toString
   302           _agent_uuid = UUID.random_string()
   303         case None =>
   303         case None =>
   304           _context = Progress.private_data.next_progress_context(db)
   304           _context = Progress.private_data.next_progress_context(db)
   305           _agent_uuid = context_uuid
   305           _agent_uuid = context_uuid
   306           db.execute_statement(Progress.private_data.Base.table.insert(), { stmt =>
   306           db.execute_statement(Progress.private_data.Base.table.insert(), { stmt =>
   307             stmt.string(1) = context_uuid
   307             stmt.string(1) = context_uuid