Handbook
Glossary
with-threaded-server ( threaded-server quot -- )
Threaded servers
Prev:
wait-for-server ( threaded-server -- )
Next:
stop-this-server ( -- )
Vocabulary
io
.
servers
Inputs
threaded-server
a
threaded-server
quot
a
quotation
Outputs
None
Word description
Runs a server and calls a quotation, stopping the server once the quotation returns.
Definition
USING:
continuations
kernel
namespaces
;
IN:
io.servers
:
with-threaded-server
( threaded-server quot -- )
[
start-server
]
dip
over
[
[
[
threaded-server
]
curry
]
dip
[
with-variable
]
curry
compose
]
dip
[
stop-server
]
curry
[
finally
]
2curry
call
;
inline