discontinued "isabelle usedir" option -r (reset session path);
simplified internal session identification: chapter / name;
clarified chapter index (of sessions) vs. session index (of theories);
discontinued "up" links, for improved modularity also wrt. partial browser_info (users can use "back" within the browser);
removed obsolete session parent_path;
/* Title: Pure/Concurrent/volatile.scala
Module: PIDE
Author: Makarius
Volatile variables.
*/
package isabelle
object Volatile
{
def apply[A](init: A): Volatile[A] = new Volatile(init)
}
final class Volatile[A] private(init: A)
{
@volatile private var state: A = init
def apply(): A = state
def >> (f: A => A) { state = f(state) }
def >>>[B] (f: A => (B, A)): B =
{
val (result, new_state) = f(state)
state = new_state
result
}
}