threads, io.streams.c: cleanups
parent
0068bce934
commit
f6c0c64518
|
@ -140,7 +140,11 @@ DEFER: next
|
|||
!
|
||||
! And if sleep-time outputs f, there are no sleeping
|
||||
! threads either... so WTF.
|
||||
sleep-time [ die 0 ] unless* (sleep) next ;
|
||||
sleep-time {
|
||||
{ [ dup not ] [ drop die ] }
|
||||
{ [ dup 0 = ] [ drop ] }
|
||||
[ (sleep) ]
|
||||
} cond next ;
|
||||
|
||||
: (next) ( arg thread -- * )
|
||||
f >>state
|
||||
|
|
|
@ -73,7 +73,8 @@ M: c-io-backend init-io ;
|
|||
|
||||
M: c-io-backend init-stdio init-c-stdio ;
|
||||
|
||||
M: c-io-backend io-multiplex 60 60 * 1000 * 1000 * or (sleep) ;
|
||||
M: c-io-backend io-multiplex
|
||||
dup 0 = [ drop ] [ 60 60 * 1000 * 1000 * or (sleep) ] if ;
|
||||
|
||||
: fopen ( path mode -- alien )
|
||||
[ utf8 string>alien ] bi@ (fopen) ;
|
||||
|
|
Loading…
Reference in New Issue