more robust startup/init: let Session.stop wait for protocol handler initialization;
--- a/src/Pure/System/isabelle_process.ML Mon Mar 13 16:06:13 2017 +0100
+++ b/src/Pure/System/isabelle_process.ML Mon Mar 13 17:21:46 2017 +0100
@@ -130,6 +130,8 @@
(fn (i, s) => standard_message (Markup.serial_properties i) Markup.errorN s);
Private_Output.system_message_fn := message Markup.systemN [];
Private_Output.protocol_message_fn := message Markup.protocolN;
+
+ Session.init_protocol_handlers ();
message Markup.initN [] [Session.welcome ()];
msg_channel
end;
@@ -202,7 +204,6 @@
val channel = System_Channel.rendezvous socket;
val msg_channel = init_channels channel;
- val _ = Session.init_protocol_handlers ();
val _ = loop channel;
in Message_Channel.shutdown msg_channel end);