diff --git a/basis/threads/threads.factor b/basis/threads/threads.factor index af11d77f84..9d1cd29337 100644 --- a/basis/threads/threads.factor +++ b/basis/threads/threads.factor @@ -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 diff --git a/core/io/streams/c/c.factor b/core/io/streams/c/c.factor index 1da30fe922..cb978d5deb 100644 --- a/core/io/streams/c/c.factor +++ b/core/io/streams/c/c.factor @@ -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) ;