]> matita.cs.unibo.it Git - helm.git/commitdiff
Some hocus-pocus to avoid a common race condition (Gtk/??? code not
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 11 Oct 2006 14:58:23 +0000 (14:58 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 11 Oct 2006 14:58:23 +0000 (14:58 +0000)
reentrant). I bet the "avoided" problem will surface again...

matita/matitaGui.ml

index 840d057c2bd897334befce94b52994e7bba173c0..19251f0744b4467e32f403a38b7b747986959f83 100644 (file)
@@ -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 =