diff options
| author | monate | 2003-04-10 13:01:02 +0000 |
|---|---|---|
| committer | monate | 2003-04-10 13:01:02 +0000 |
| commit | f9c4910220d17f0e9251adfd000cae1c5fec73ef (patch) | |
| tree | 0b81349eed8286aeb79e5bc31030b23a8e25c5aa /ide | |
| parent | c72121404b3effcb48ddf25063fd6b3fe6573319 (diff) | |
coqide: thread bug fix
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3900 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'ide')
| -rw-r--r-- | ide/coqide.ml | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ide/coqide.ml b/ide/coqide.ml index 46299c53b4..dfcedc8267 100644 --- a/ide/coqide.ml +++ b/ide/coqide.ml @@ -9,13 +9,13 @@ let cb_ = ref None let cb () = out_some !cb_ let last_cb_content = ref "" -let yes_icon = "gtk-yes" -let no_icon = "gtk-no" -let save_icon = "gtk-save" -let saveas_icon = "gtk-save-as" -let warning_icon = "gtk-dialog-warning" -let dialog_size = 6 -let small_size = 1 +let yes_icon = `YES +let no_icon = `NO +let save_icon = `SAVE +let saveas_icon = `SAVE_AS +let warning_icon = `DIALOG_WARNING +let dialog_size = `DIALOG +let small_size = `SMALL_TOOLBAR let window_width = 800 let window_height = 600 @@ -227,6 +227,7 @@ let full_do_if_not_computing f x = if Mutex.try_lock coq_computing then ignore (Thread.create (fun () -> + Glib.Thread.enter (); prerr_endline "Launching thread"; begin prerr_endline "Getting lock"; @@ -234,9 +235,11 @@ if Mutex.try_lock coq_computing then f x; prerr_endline "Releasing lock"; Mutex.unlock coq_computing; + Glib.Thread.leave (); with e -> prerr_endline "Releasing lock (on error)"; Mutex.unlock coq_computing; + Glib.Thread.leave (); raise e end) ()) @@ -2156,6 +2159,7 @@ let start () = (try GtkMain.Rc.add_default_file (Filename.concat (Sys.getenv "HOME") ".coqiderc"); with Not_found -> ()); + Glib.Thread.init (); ignore (GtkMain.Main.init ()); GtkData.AccelGroup.set_default_mod_mask (Some [`CONTROL;`SHIFT;`MOD1;`MOD3;`MOD4]); |
