Merge branch 'master' into no_literal_table
commit
f96b127ba9
|
@ -9,10 +9,9 @@ IN: io.backend.unix.multiplexers.epoll
|
||||||
|
|
||||||
TUPLE: epoll-mx < mx events ;
|
TUPLE: epoll-mx < mx events ;
|
||||||
|
|
||||||
: max-events ( -- n )
|
#! We read up to 256 events at a time. This is an arbitrary
|
||||||
#! We read up to 256 events at a time. This is an arbitrary
|
#! constant...
|
||||||
#! constant...
|
CONSTANT: max-events 256
|
||||||
256 ; inline
|
|
||||||
|
|
||||||
: <epoll-mx> ( -- mx )
|
: <epoll-mx> ( -- mx )
|
||||||
epoll-mx new-mx
|
epoll-mx new-mx
|
||||||
|
|
|
@ -3,7 +3,7 @@ USING: io.files io.files.temp io.directories io.pathnames
|
||||||
tools.test io.launcher arrays io namespaces continuations math
|
tools.test io.launcher arrays io namespaces continuations math
|
||||||
io.encodings.binary io.encodings.ascii accessors kernel
|
io.encodings.binary io.encodings.ascii accessors kernel
|
||||||
sequences io.encodings.utf8 destructors io.streams.duplex locals
|
sequences io.encodings.utf8 destructors io.streams.duplex locals
|
||||||
concurrency.promises threads unix.process ;
|
concurrency.promises threads unix.process calendar ;
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
[ "launcher-test-1" temp-file delete-file ] ignore-errors
|
[ "launcher-test-1" temp-file delete-file ] ignore-errors
|
||||||
|
@ -128,12 +128,13 @@ concurrency.promises threads unix.process ;
|
||||||
[let
|
[let
|
||||||
<promise> :> p
|
<promise> :> p
|
||||||
<promise> :> s
|
<promise> :> s
|
||||||
|
|
||||||
[
|
[
|
||||||
"sleep 1000" run-detached
|
"sleep 1000" run-detached
|
||||||
[ p fulfill ] [ wait-for-process s fulfill ] bi
|
[ p fulfill ] [ wait-for-process s fulfill ] bi
|
||||||
] in-thread
|
] in-thread
|
||||||
|
|
||||||
p ?promise handle>> 9 kill drop
|
p 1 seconds ?promise-timeout handle>> 9 kill drop
|
||||||
s ?promise 0 =
|
s ?promise 0 =
|
||||||
]
|
]
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
Loading…
Reference in New Issue