]> gitweb.factorcode.org Git - factor.git/blobdiff - core/threads/threads.factor
Debugging threads
[factor.git] / core / threads / threads.factor
index fc3915e4625eeee1d20d88a8be6b31b7923934f8..32d5e5234d2a281aa8ea367d3df98f1f2cd589b4 100755 (executable)
@@ -1,10 +1,11 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! Copyright (C) 2005 Mackenzie Straight.
 ! See http://factorcode.org/license.txt for BSD license.
-IN: threads
 USING: arrays hashtables heaps kernel kernel.private math
 namespaces sequences vectors continuations continuations.private
-dlists assocs system combinators init boxes accessors ;
+dlists assocs system combinators init boxes accessors
+math.order ;
+IN: threads
 
 SYMBOL: initial-thread
 
@@ -94,7 +95,7 @@ DEFER: stop
 
 <PRIVATE
 
-: schedule-sleep ( thread ms -- )
+: schedule-sleep ( thread dt -- )
     >r check-registered dup r> sleep-queue heap-push*
     >>sleep-entry drop ;
 
@@ -172,7 +173,7 @@ M: integer sleep-until
 M: f sleep-until
     drop [ drop ] "interrupt" suspend drop ;
 
-GENERIC: sleep ( ms -- )
+GENERIC: sleep ( dt -- )
 
 M: real sleep
     millis + >integer sleep-until ;