! Copyright (C) 2005 Mackenzie Straight.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.private arrays assocs boxes combinators
-continuations continuations.private deques dlists fry hashtables
-heaps init kernel kernel.private math math.order namespaces
+continuations continuations.private deques dlists hashtables
+heaps kernel kernel.private math math.order namespaces
quotations sequences strings system ;
IN: threads
SYMBOL: initial-thread
TUPLE: thread
-{ name string }
-{ quot callable initial: [ ] }
-{ exit-handler callable initial: [ ] }
-{ id integer }
-{ context box }
-state
-runnable
-mailbox
-{ variables hashtable }
-sleep-entry ;
+ { name string }
+ { quot callable initial: [ ] }
+ { exit-handler callable initial: [ ] }
+ { id integer }
+ { context box }
+ state
+ runnable
+ mailbox
+ { variables hashtable }
+ sleep-entry ;
: self ( -- thread )
OBJ-CURRENT-THREAD special-object { thread } declare ; inline
PRIVATE>
-[ init-threads ] "threads" add-startup-hook
+STARTUP-HOOK: init-threads