summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk/support/tkthread.ml
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/labltk/support/tkthread.ml')
-rw-r--r--otherlibs/labltk/support/tkthread.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/otherlibs/labltk/support/tkthread.ml b/otherlibs/labltk/support/tkthread.ml
index 0336afe3c..04dcc74c5 100644
--- a/otherlibs/labltk/support/tkthread.ml
+++ b/otherlibs/labltk/support/tkthread.ml
@@ -26,7 +26,7 @@ let cannot_sync () =
| Some id -> Thread.id (Thread.self ()) = id
let gui_safe () =
- not (Sys.os_type = "Win32") || !loop_id = Some(Thread.id (Thread.self ()))
+ !loop_id = Some(Thread.id (Thread.self ()))
let has_jobs () = not (with_jobs Queue.is_empty)
let n_jobs () = with_jobs Queue.length
@@ -52,9 +52,9 @@ let rec job_timer () =
let thread_main () =
try
+ loop_id := Some (Thread.id (Thread.self ()));
ignore (Protocol.openTk());
job_timer();
- loop_id := Some (Thread.id (Thread.self ()));
Protocol.mainLoop();
loop_id := None;
with exn ->