X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2FmatitaGui.ml;h=19251f0744b4467e32f403a38b7b747986959f83;hb=cd3f7fdf54fa106c58004f1ab8d7c1ecfc06aec0;hp=2a607d9fcf0cac59bf7a538d90b82c8239700952;hpb=f69398e899452aaf8490d7f1a116e30163426bc7;p=helm.git diff --git a/matita/matitaGui.ml b/matita/matitaGui.ml index 2a607d9fc..19251f074 100644 --- a/matita/matitaGui.ml +++ b/matita/matitaGui.ml @@ -422,7 +422,9 @@ class gui () = main#buttonsToolbar#misc#set_sensitive true; develList#buttonsHbox#misc#set_sensitive true; main#scriptMenu#misc#set_sensitive true; - source_view#set_editable true + source_view#set_editable true; + (*The next line seems sufficient to avoid some unknown race condition *) + GtkThread.sync (fun () -> ()) () in let worker_thread = ref None in let notify_exn exn = @@ -463,8 +465,8 @@ class gui () = f (); unlock_world () with exc -> - unlock_world (); - notify_exn exc + notify_exn exc; + unlock_world () in worker_thread := Some (Thread.create thread_main ()) in let kill_worker =