From: Claudio Sacerdoti Coen Date: Wed, 11 Oct 2006 14:58:23 +0000 (+0000) Subject: Some hocus-pocus to avoid a common race condition (Gtk/??? code not X-Git-Tag: make_still_working~6762 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=3ae4146d42847c984531352f1a589b002eb4d1c6;hp=d18bffef7df9bbfc5ceae7ac7b607c96611e1978;p=helm.git Some hocus-pocus to avoid a common race condition (Gtk/??? code not reentrant). I bet the "avoided" problem will surface again... --- diff --git a/helm/software/matita/matitaGui.ml b/helm/software/matita/matitaGui.ml index 840d057c2..19251f074 100644 --- a/helm/software/matita/matitaGui.ml +++ b/helm/software/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 =