tools.deploy.shaker: make sure an io-multiplex method remains even if C streams are stripped out
parent
587664efbf
commit
ce42aea6a4
|
@ -392,13 +392,15 @@ IN: tools.deploy.shaker
|
|||
] [ drop ] if ;
|
||||
|
||||
: strip-c-io ( -- )
|
||||
! On all platforms, if deploy-io is 1, we strip out C streams.
|
||||
! On Unix, if deploy-io is 3, we strip out C streams as well.
|
||||
! On Windows, even if deploy-io is 3, C streams are still used
|
||||
! for the console, so don't strip it there.
|
||||
strip-io?
|
||||
deploy-io get 3 = os windows? not and
|
||||
or [
|
||||
[
|
||||
c-io-backend forget
|
||||
"io.streams.c" forget-vocab
|
||||
] with-compilation-unit
|
||||
"Stripping C I/O" show
|
||||
"vocab:tools/deploy/shaker/strip-c-io.factor" run-file
|
||||
] when ;
|
||||
|
||||
: compress ( pred post-process string -- )
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
USING: compiler.units definitions io.backend io.streams.c kernel
|
||||
math threads.private vocabs ;
|
||||
|
||||
[
|
||||
c-io-backend forget
|
||||
"io.streams.c" forget-vocab
|
||||
] with-compilation-unit
|
||||
|
||||
M: object io-multiplex
|
||||
dup 0 = [ drop ] [ 60 60 * 1000 * 1000 * or (sleep) ] if ;
|
Loading…
Reference in New Issue