further formal thread-safety (follow-up to 88300168baf8) -- in practice there is only a single Isar toplevel loop, but this is not enforced;
--- a/src/Pure/Isar/isar_document.ML Thu May 27 18:10:37 2010 +0200
+++ b/src/Pure/Isar/isar_document.ML Thu May 27 20:15:36 2010 +0200
@@ -120,11 +120,13 @@
in
fun define_state (id: state_id) =
- Unsynchronized.change global_states (Symtab.update_new (id, empty_state))
- handle Symtab.DUP dup => err_dup "state" dup;
+ NAMED_CRITICAL "Isar" (fn () =>
+ Unsynchronized.change global_states (Symtab.update_new (id, empty_state))
+ handle Symtab.DUP dup => err_dup "state" dup);
fun put_state (id: state_id) state =
- Unsynchronized.change global_states (Symtab.update (id, state));
+ NAMED_CRITICAL "Isar" (fn () =>
+ Unsynchronized.change global_states (Symtab.update (id, state)));
fun the_state (id: state_id) =
(case Symtab.lookup (! global_states) id of