]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.backend.cocoa: factor out stop-io-thread word for use by upcoming Gtk UI backend
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Sat, 29 May 2010 05:49:40 +0000 (01:49 -0400)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Sat, 29 May 2010 08:27:54 +0000 (04:27 -0400)
basis/io/thread/thread.factor
basis/ui/backend/cocoa/cocoa.factor

index 994dcd9c501f81d07dfe571f8a4b0f6f29432936..519dec3567715f92588c4a9267bd1c48abb4c736 100644 (file)
@@ -14,6 +14,9 @@ SYMBOL: io-thread-running?
     [ [ io-thread-running? get-global ] [ io-thread ] while ]\r
     "I/O wait" spawn drop ;\r
 \r
+: stop-io-thread ( -- )\r
+    f io-thread-running? set-global ;\r
+\r
 [\r
     t io-thread-running? set-global\r
     start-io-thread\r
index 72a9abcef0edede404173fc328e9ef7c3707eb30..7982458bb420b28970a60385087003a8115d6f58 100644 (file)
@@ -252,7 +252,7 @@ M: cocoa-ui-backend (with-ui)
             init-clipboard
             cocoa-startup-hook get call( -- )
             start-ui
-            f io-thread-running? set-global
+            stop-io-thread
             init-thread-timer
             reset-run-loop
             NSApp -> run