1 ! Copyright (C) 2008, 2010 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors assocs io io.styles kernel math.order
4 math.parser prettyprint sequences sorting system threads ;
7 : thread. ( thread -- )
13 [ dup self eq? "running" "yield" ? ] unless*
18 key>> nano-count [-] number>string write
24 standard-table-style [
26 { "ID:" "Name:" "Waiting on:" "Remaining sleep:" }
27 [ [ write ] with-cell ] each
30 threads sort-keys values [