1537 lines
53 KiB
HTML
1537 lines
53 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<!-- Created on June 24, 2025 by texi2html 5.0
|
||
texi2html was written by:
|
||
Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
||
Karl Berry <karl@freefriends.org>
|
||
Olaf Bachmann <obachman@mathematik.uni-kl.de>
|
||
and many others.
|
||
Maintained by: Many creative people.
|
||
Send bugs and suggestions to <texi2html-bug@nongnu.org>
|
||
-->
|
||
<head>
|
||
<title>Untitled Document</title>
|
||
|
||
<meta name="description" content="Untitled Document">
|
||
<meta name="keywords" content="Untitled Document">
|
||
<meta name="resource-type" content="document">
|
||
<meta name="distribution" content="global">
|
||
<meta name="Generator" content="texi2html 5.0">
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
<style type="text/css">
|
||
<!--
|
||
a.summary-letter {text-decoration: none}
|
||
blockquote.smallquotation {font-size: smaller}
|
||
div.display {margin-left: 3.2em}
|
||
div.example {margin-left: 3.2em}
|
||
div.lisp {margin-left: 3.2em}
|
||
div.smalldisplay {margin-left: 3.2em}
|
||
div.smallexample {margin-left: 3.2em}
|
||
div.smalllisp {margin-left: 3.2em}
|
||
pre.display {font-family: serif}
|
||
pre.format {font-family: serif}
|
||
pre.menu-comment {font-family: serif}
|
||
pre.menu-preformatted {font-family: serif}
|
||
pre.smalldisplay {font-family: serif; font-size: smaller}
|
||
pre.smallexample {font-size: smaller}
|
||
pre.smallformat {font-family: serif; font-size: smaller}
|
||
pre.smalllisp {font-size: smaller}
|
||
span.nocodebreak {white-space:pre}
|
||
span.nolinebreak {white-space:pre}
|
||
span.roman {font-family:serif; font-weight:normal}
|
||
span.sansserif {font-family:sans-serif; font-weight:normal}
|
||
ul.no-bullet {list-style: none}
|
||
-->
|
||
</style>
|
||
<link rel="stylesheet" type="text/css" href="https://luis-felipe.gitlab.io/texinfo-css/static/css/texinfo-7.css">
|
||
|
||
|
||
</head>
|
||
|
||
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
||
|
||
<a name="API"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[ << ]</td>
|
||
<td valign="middle" align="left">[ < ]</td>
|
||
<td valign="middle" align="left">[ Up ]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fnon_002dblocking" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<a name="API-1"></a>
|
||
<h1 class="chapter">1 API</h1>
|
||
<p>The following is the list of modules provided by this library.
|
||
</p>
|
||
|
||
|
||
<hr>
|
||
<a name="knots_005fnon_002dblocking"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-3" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<a name="g_t_0028knots-non_002dblocking_0029"></a>
|
||
<h2 class="section">1.1 (knots non-blocking)</h2>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Procedures-3"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fnon_002dblocking" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fnon_002dblocking" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fparallelism" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.1.1 Procedures</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-non_002dblocking_002dopen_002dsocket_002dfor_002duri"></a>Procedure: <strong>non-blocking-open-socket-for-uri</strong><em> uri KEY: #:verify-certificate?</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-non_002dblocking_002dport"></a>Procedure: <strong>non-blocking-port</strong><em> port</em></dt>
|
||
<dd><p>Make PORT non-blocking and return it.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="knots_005fparallelism"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-3" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Macros" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<a name="g_t_0028knots-parallelism_0029"></a>
|
||
<h2 class="section">1.2 (knots parallelism)</h2>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Macros"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fparallelism" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fparallelism" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.2.1 Macros</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dlet"></a>Macro: <strong>fibers-let</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dparallel"></a>Macro: <strong>fibers-parallel</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Procedures"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Macros" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fparallelism" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fpromise" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.2.2 Procedures</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fiberize"></a>Procedure: <strong>fiberize</strong><em> proc KEY: #:parallelism #:input-channel #:process-channel</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dbatch_002dfor_002deach"></a>Procedure: <strong>fibers-batch-for-each</strong><em> proc parallelism-limit . lists</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dbatch_002dmap"></a>Procedure: <strong>fibers-batch-map</strong><em> proc parallelism-limit . lists</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dfor_002deach"></a>Procedure: <strong>fibers-for-each</strong><em> proc . lists</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dmap"></a>Procedure: <strong>fibers-map</strong><em> proc . lists</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dmap_002dwith_002dprogress"></a>Procedure: <strong>fibers-map-with-progress</strong><em> proc lists KEY: #:report</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="knots_005fpromise"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Macros-4" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<a name="g_t_0028knots-promise_0029"></a>
|
||
<h2 class="section">1.3 (knots promise)</h2>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Macros-4"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fpromise" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fpromise" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-7" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.3.1 Macros</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dpromise_003f"></a>Macro: <strong>fibers-promise?</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Procedures-7"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Macros-4" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fpromise" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fqueue" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.3.2 Procedures</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002ddelay"></a>Procedure: <strong>fibers-delay</strong><em> thunk</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dforce"></a>Procedure: <strong>fibers-force</strong><em> fp</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dpromise_002dreset"></a>Procedure: <strong>fibers-promise-reset</strong><em> fp</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fibers_002dpromise_002dresult_002davailable_003f"></a>Procedure: <strong>fibers-promise-result-available?</strong><em> fp</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="knots_005fqueue"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-7" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-6" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<a name="g_t_0028knots-queue_0029"></a>
|
||
<h2 class="section">1.4 (knots queue)</h2>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Procedures-6"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fqueue" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fqueue" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fresource_002dpool" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.4.1 Procedures</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-spawn_002dqueueing_002dfiber"></a>Procedure: <strong>spawn-queueing-fiber</strong><em> dest-channel</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="knots_005fresource_002dpool"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-6" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Macros-3" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<a name="g_t_0028knots-resource_002dpool_0029"></a>
|
||
<h2 class="section">1.5 (knots resource-pool)</h2>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Macros-3"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fresource_002dpool" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fresource_002dpool" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Parameters" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.5.1 Macros</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002dchannel"></a>Macro: <strong>resource-pool-channel</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002dconfiguration"></a>Macro: <strong>resource-pool-configuration</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002dname"></a>Macro: <strong>resource-pool-name</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_003f"></a>Macro: <strong>resource-pool?</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-with_002dresource_002dfrom_002dpool"></a>Macro: <strong>with-resource-from-pool</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Parameters"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Macros-3" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fresource_002dpool" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-1" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.5.2 Parameters</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002ddefault_002dtimeout_002dhandler"></a>Parameter: <strong>resource-pool-default-timeout-handler</strong></dt>
|
||
<dd><p>Default value:
|
||
</p>
|
||
<pre class="verbatim">#f
|
||
</pre>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Procedures-1"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Parameters" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fresource_002dpool" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Record-Types" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.5.3 Procedures</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-call_002dwith_002dresource_002dfrom_002dpool"></a>Procedure: <strong>call-with-resource-from-pool</strong><em> pool proc KEY: #:timeout #:timeout-handler #:max-waiters #:channel #:destroy-resource-on-exception?</em></dt>
|
||
<dd><p>Call PROC with a resource from POOL, blocking until a resource becomes
|
||
available. Return the resource once PROC has returned.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-destroy_002dresource_002dpool"></a>Procedure: <strong>destroy-resource-pool</strong><em> pool</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-make_002dresource_002dpool"></a>Procedure: <strong>make-resource-pool</strong><em> return-new-resource max-size KEY: #:min-size #:idle-seconds #:delay-logger #:duration-logger #:destructor #:lifetime #:scheduler #:name #:add-resources-parallelism #:default-checkout-timeout #:default-max-waiters</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-make_002dresource_002dpool_002ddestroy_002dresource_002dexception"></a>Procedure: <strong>make-resource-pool-destroy-resource-exception</strong></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002ddestroy_002dresource_002dexception_003f"></a>Procedure: <strong>resource-pool-destroy-resource-exception?</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002ddestroyed_002derror_002dpool"></a>Procedure: <strong>resource-pool-destroyed-error-pool</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002ddestroyed_002derror_003f"></a>Procedure: <strong>resource-pool-destroyed-error?</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002dstats"></a>Procedure: <strong>resource-pool-stats</strong><em> pool KEY: #:timeout</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002dtimeout_002derror_002dpool"></a>Procedure: <strong>resource-pool-timeout-error-pool</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002dtimeout_002derror_003f"></a>Procedure: <strong>resource-pool-timeout-error?</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002dtoo_002dmany_002dwaiters_002derror_002dpool"></a>Procedure: <strong>resource-pool-too-many-waiters-error-pool</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002dtoo_002dmany_002dwaiters_002derror_002dwaiters_002dcount"></a>Procedure: <strong>resource-pool-too-many-waiters-error-waiters-count</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-resource_002dpool_002dtoo_002dmany_002dwaiters_002derror_003f"></a>Procedure: <strong>resource-pool-too-many-waiters-error?</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Record-Types"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-1" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fresource_002dpool" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fthread_002dpool" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.5.4 Record Types</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-_0026resource_002dpool_002ddestroy_002dresource"></a>Record type: <strong>&resource-pool-destroy-resource</strong></dt>
|
||
<dd><p>This record type has the following fields:
|
||
</p>
|
||
<ul>
|
||
</ul>
|
||
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-_0026resource_002dpool_002ddestroyed"></a>Record type: <strong>&resource-pool-destroyed</strong></dt>
|
||
<dd><p>This record type has the following fields:
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code>pool</code></li></ul>
|
||
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-_0026resource_002dpool_002dtimeout"></a>Record type: <strong>&resource-pool-timeout</strong></dt>
|
||
<dd><p>This record type has the following fields:
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code>pool</code></li></ul>
|
||
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-_0026resource_002dpool_002dtoo_002dmany_002dwaiters"></a>Record type: <strong>&resource-pool-too-many-waiters</strong></dt>
|
||
<dd><p>This record type has the following fields:
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code>pool</code></li><li>
|
||
<code>waiters-count</code></li></ul>
|
||
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="knots_005fthread_002dpool"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Record-Types" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Macros-2" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<a name="g_t_0028knots-thread_002dpool_0029"></a>
|
||
<h2 class="section">1.6 (knots thread-pool)</h2>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Macros-2"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fthread_002dpool" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fthread_002dpool" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-2" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.6.1 Macros</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fixed_002dsize_002dthread_002dpool_002dchannel"></a>Macro: <strong>fixed-size-thread-pool-channel</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fixed_002dsize_002dthread_002dpool_002dcurrent_002dprocedures"></a>Macro: <strong>fixed-size-thread-pool-current-procedures</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-fixed_002dsize_002dthread_002dpool_003f"></a>Macro: <strong>fixed-size-thread-pool?</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-thread_002dpool_002dresource_002dpool"></a>Macro: <strong>thread-pool-resource-pool</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-thread_002dpool_003f"></a>Macro: <strong>thread-pool?</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Procedures-2"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Macros-2" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fthread_002dpool" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Record-Types-1" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.6.2 Procedures</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-call_002dwith_002dthread"></a>Procedure: <strong>call-with-thread</strong><em> thread-pool proc KEY: #:duration-logger #:checkout-timeout #:channel #:destroy-thread-on-exception? #:max-waiters</em></dt>
|
||
<dd><p>Send PROC to the thread pool through CHANNEL. Return the result of
|
||
PROC. If already in the thread pool, call PROC immediately.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-destroy_002dthread_002dpool"></a>Procedure: <strong>destroy-thread-pool</strong><em> pool</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-make_002dfixed_002dsize_002dthread_002dpool"></a>Procedure: <strong>make-fixed-size-thread-pool</strong><em> size KEY: #:thread-initializer #:thread-destructor #:delay-logger #:duration-logger #:thread-lifetime #:expire-on-exception? #:name #:use-default-io-waiters? #:default-checkout-timeout</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-make_002dthread_002dpool"></a>Procedure: <strong>make-thread-pool</strong><em> max-size KEY: #:min-size #:scheduler #:thread-initializer #:thread-destructor #:delay-logger #:duration-logger #:thread-lifetime #:expire-on-exception? #:name #:use-default-io-waiters? #:default-checkout-timeout</em></dt>
|
||
<dd><p>Return a channel used to offload work to a dedicated thread. ARGS are
|
||
the arguments of the thread pool procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-set_002dthread_002dname"></a>Procedure: <strong>set-thread-name</strong><em> name</em></dt>
|
||
<dd><p>Set the name of the calling thread to NAME. NAME is truncated to 15
|
||
bytes.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-thread_002dname"></a>Procedure: <strong>thread-name</strong></dt>
|
||
<dd><p>Return the name of the calling thread as a string.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-thread_002dpool_002darguments_002dparameter"></a>Procedure: <strong>thread-pool-arguments-parameter</strong><em> pool</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-thread_002dpool_002ddefault_002dcheckout_002dtimeout"></a>Procedure: <strong>thread-pool-default-checkout-timeout</strong><em> pool</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-thread_002dpool_002dtimeout_002derror_002dpool"></a>Procedure: <strong>thread-pool-timeout-error-pool</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-thread_002dpool_002dtimeout_002derror_003f"></a>Procedure: <strong>thread-pool-timeout-error?</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Record-Types-1"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-2" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fthread_002dpool" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005ftimeout" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.6.3 Record Types</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-_0026thread_002dpool_002dtimeout_002derror"></a>Record type: <strong>&thread-pool-timeout-error</strong></dt>
|
||
<dd><p>This record type has the following fields:
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code>pool</code></li></ul>
|
||
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="knots_005ftimeout"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Record-Types-1" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-5" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<a name="g_t_0028knots-timeout_0029"></a>
|
||
<h2 class="section">1.7 (knots timeout)</h2>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Procedures-5"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005ftimeout" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005ftimeout" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Record-Types-3" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.7.1 Procedures</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-port_002dread_002dtimeout_002derror_003f"></a>Procedure: <strong>port-read-timeout-error?</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-port_002dtimeout_002derror_003f"></a>Procedure: <strong>port-timeout-error?</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-port_002dwrite_002dtimeout_002derror_003f"></a>Procedure: <strong>port-write-timeout-error?</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-wait_002duntil_002dport_002dreadable_002doperation"></a>Procedure: <strong>wait-until-port-readable-operation</strong><em> port</em></dt>
|
||
<dd><p>Make an operation that will succeed when PORT is readable.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-wait_002duntil_002dport_002dwritable_002doperation"></a>Procedure: <strong>wait-until-port-writable-operation</strong><em> port</em></dt>
|
||
<dd><p>Make an operation that will succeed when PORT is writable.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-with_002dfibers_002dtimeout"></a>Procedure: <strong>with-fibers-timeout</strong><em> thunk KEY: #:timeout #:on-timeout</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-with_002dport_002dtimeouts"></a>Procedure: <strong>with-port-timeouts</strong><em> thunk KEY: #:timeout #:read-timeout #:write-timeout</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Record-Types-3"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-5" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005ftimeout" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fweb_002dserver" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.7.2 Record Types</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-_0026port_002dread_002dtimeout_002derror"></a>Record type: <strong>&port-read-timeout-error</strong></dt>
|
||
<dd><p>This record type has the following fields:
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code>thunk</code></li><li>
|
||
<code>port</code></li></ul>
|
||
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-_0026port_002dtimeout_002derror"></a>Record type: <strong>&port-timeout-error</strong></dt>
|
||
<dd><p>This record type has the following fields:
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code>thunk</code></li><li>
|
||
<code>port</code></li></ul>
|
||
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-_0026port_002dwrite_002dtimeout_002derror"></a>Record type: <strong>&port-write-timeout-error</strong></dt>
|
||
<dd><p>This record type has the following fields:
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code>thunk</code></li><li>
|
||
<code>port</code></li></ul>
|
||
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="knots_005fweb_002dserver"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Record-Types-3" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Macros-1" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<a name="g_t_0028knots-web_002dserver_0029"></a>
|
||
<h2 class="section">1.8 (knots web-server)</h2>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Macros-1"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fweb_002dserver" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fweb_002dserver" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-4" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.8.1 Macros</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-web_002dserver_002dport"></a>Macro: <strong>web-server-port</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-web_002dserver_002dsocket"></a>Macro: <strong>web-server-socket</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-web_002dserver_003f"></a>Macro: <strong>web-server?</strong><em> x</em></dt>
|
||
<dd><p>Undocumented macro.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Procedures-4"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Macros-1" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fweb_002dserver" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Record-Types-2" title="Next section in reading order"> > </a>]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.8.2 Procedures</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-default_002dwrite_002dresponse_002dexception_002dhandler"></a>Procedure: <strong>default-write-response-exception-handler</strong><em> exn request</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-make_002dchunked_002doutput_002dport_002fknots"></a>Procedure: <strong>make-chunked-output-port/knots</strong><em> port KEY: #:keep-alive? #:buffering</em></dt>
|
||
<dd><p>Returns a new port which translates non-encoded data into a HTTP chunked
|
||
transfer encoded data and writes this to PORT. Data written to this
|
||
port is buffered until the port is flushed, at which point it is all
|
||
sent as one chunk. The port will otherwise be flushed every BUFFERING
|
||
bytes, which defaults to 1200. Take care to close the port when done,
|
||
as it will output the remaining data, and encode the final zero chunk.
|
||
When the port is closed it will also close PORT, unless KEEP-ALIVE? is
|
||
true.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-read_002drequest_002dbody_002fknots"></a>Procedure: <strong>read-request-body/knots</strong><em> r</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-request_002dbody_002dended_002dprematurely_002derror_003f"></a>Procedure: <strong>request-body-ended-prematurely-error?</strong><em> obj</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-request_002dbody_002dport_002fknots"></a>Procedure: <strong>request-body-port/knots</strong><em> r</em></dt>
|
||
<dd><p>Undocumented procedure.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-run_002dknots_002dweb_002dserver"></a>Procedure: <strong>run-knots-web-server</strong><em> handler KEY: #:host #:family #:addr #:port #:socket #:read-request-exception-handler #:write-response-exception-handler #:connection-idle-timeout #:connection-buffer-size</em></dt>
|
||
<dd><p>Run the knots web server.
|
||
</p>
|
||
<p>HANDLER should be a procedure that takes one argument, the HTTP request
|
||
and returns two values, the response and response body.
|
||
</p>
|
||
<p>For example, here is a simple "Hello, World!" server:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example"> (define (handler request)
|
||
(let ((body (read-request-body request)))
|
||
(values '((content-type . (text/plain)))
|
||
"Hello, World!")))
|
||
(run-knots-web-server handler)
|
||
</pre></div>
|
||
|
||
<p>The response and body will be run through ‘sanitize-response’ before
|
||
sending back to the client.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-sanitize_002dresponse"></a>Procedure: <strong>sanitize-response</strong><em> request response body</em></dt>
|
||
<dd><p>"Sanitize" the given response and body, making them appropriate for the
|
||
given request.
|
||
</p>
|
||
<p>As a convenience to web handler authors, RESPONSE may be given as an
|
||
alist of headers, in which case it is used to construct a default
|
||
response. Ensures that the response version corresponds to the request
|
||
version. If BODY is a string, encodes the string to a bytevector, in an
|
||
encoding appropriate for RESPONSE. Adds a ‘content-length’ and
|
||
‘content-type’ header, as necessary.
|
||
</p>
|
||
<p>If BODY is a procedure, it is called with a port as an argument, and the
|
||
output collected as a bytevector. In the future we might try to instead
|
||
use a compressing, chunk-encoded port, and call this procedure later, in
|
||
the write-client procedure. Authors are advised not to rely on the
|
||
procedure being called at any particular time.
|
||
</p>
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr>
|
||
<a name="Record-Types-2"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#Procedures-4" title="Previous section in reading order"> < </a>]</td>
|
||
<td valign="middle" align="left">[<a href="#knots_005fweb_002dserver" title="Up section"> Up </a>]</td>
|
||
<td valign="middle" align="left">[ > ]</td>
|
||
<td valign="middle" align="left">[ >> ]</td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left"> </td>
|
||
<td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h3 class="subsection">1.8.3 Record Types</h3>
|
||
|
||
|
||
<dl>
|
||
<dt><a name="index-_0026request_002dbody_002dended_002dprematurely"></a>Record type: <strong>&request-body-ended-prematurely</strong></dt>
|
||
<dd><p>This record type has the following fields:
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code>bytes-read</code></li></ul>
|
||
|
||
</dd></dl>
|
||
|
||
|
||
|
||
|
||
|
||
<hr size="6">
|
||
<a name="SEC_About"></a>
|
||
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
||
<tr><td valign="middle" align="left">[<a href="#API" title="Cover (top) of document">Top</a>]</td>
|
||
<td valign="middle" align="left">[Contents]</td>
|
||
<td valign="middle" align="left">[Index]</td>
|
||
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
||
</tr></table>
|
||
<h1>About This Document</h1>
|
||
|
||
<p>
|
||
This document was generated on <i>June 24, 2025</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 5.0</i></a>.
|
||
</p>
|
||
<p>
|
||
The buttons in the navigation panels have the following meaning:
|
||
</p>
|
||
<table border="1">
|
||
<tr>
|
||
<th> Button </th>
|
||
<th> Name </th>
|
||
<th> Go to </th>
|
||
<th> From 1.2.3 go to</th>
|
||
</tr>
|
||
<tr>
|
||
<td align="center"> [ << ] </td>
|
||
<td align="center">FastBack</td>
|
||
<td>Beginning of this chapter or previous chapter</td>
|
||
<td>1</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center"> [ < ] </td>
|
||
<td align="center">Back</td>
|
||
<td>Previous section in reading order</td>
|
||
<td>1.2.2</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center"> [ Up ] </td>
|
||
<td align="center">Up</td>
|
||
<td>Up section</td>
|
||
<td>1.2</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center"> [ > ] </td>
|
||
<td align="center">Forward</td>
|
||
<td>Next section in reading order</td>
|
||
<td>1.2.4</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center"> [ >> ] </td>
|
||
<td align="center">FastForward</td>
|
||
<td>Next chapter</td>
|
||
<td>2</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center"> [Top] </td>
|
||
<td align="center">Top</td>
|
||
<td>Cover (top) of document</td>
|
||
<td> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center"> [Contents] </td>
|
||
<td align="center">Contents</td>
|
||
<td>Table of contents</td>
|
||
<td> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center"> [Index] </td>
|
||
<td align="center">Index</td>
|
||
<td>Index</td>
|
||
<td> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center"> [ ? ] </td>
|
||
<td align="center">About</td>
|
||
<td>About (help)</td>
|
||
<td> </td>
|
||
</tr>
|
||
</table>
|
||
|
||
<p>
|
||
where the <strong> Example </strong> assumes that the current position is at <strong> Subsubsection One-Two-Three </strong> of a document of the following structure:
|
||
</p>
|
||
|
||
<ul>
|
||
<li> 1. Section One
|
||
<ul>
|
||
<li>1.1 Subsection One-One
|
||
<ul>
|
||
<li>...</li>
|
||
</ul>
|
||
</li>
|
||
<li>1.2 Subsection One-Two
|
||
<ul>
|
||
<li>1.2.1 Subsubsection One-Two-One</li>
|
||
<li>1.2.2 Subsubsection One-Two-Two</li>
|
||
<li>1.2.3 Subsubsection One-Two-Three
|
||
<strong><== Current Position </strong></li>
|
||
<li>1.2.4 Subsubsection One-Two-Four</li>
|
||
</ul>
|
||
</li>
|
||
<li>1.3 Subsection One-Three
|
||
<ul>
|
||
<li>...</li>
|
||
</ul>
|
||
</li>
|
||
<li>1.4 Subsection One-Four</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<hr>
|
||
<p>
|
||
<font size="-1">
|
||
This document was generated on <i>June 24, 2025</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 5.0</i></a>.
|
||
</font>
|
||
<br>
|
||
|
||
</p>
|
||
</body>
|
||
</html>
|