This file is indexed.

/usr/share/doc/racket/reference/custodians.html is in racket-doc 6.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>14.7&nbsp;Custodians</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9658;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="security.html" class="tocviewselflink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18&nbsp;</td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9660;</a></td><td>14&nbsp;</td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr></table><div class="tocviewsublistbottom" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">14.1&nbsp;</td><td><a href="Namespaces.html" class="tocviewlink" data-pltdoc="x">Namespaces</a></td></tr><tr><td align="right">14.2&nbsp;</td><td><a href="eval.html" class="tocviewlink" data-pltdoc="x">Evaluation and Compilation</a></td></tr><tr><td align="right">14.3&nbsp;</td><td><a href="load-lang.html" class="tocviewlink" data-pltdoc="x">The <span class="RktModLink"><span class="RktSym">racket/<span class="mywbr"> &nbsp;</span>load</span></span> Language</a></td></tr><tr><td align="right">14.4&nbsp;</td><td><a href="Module_Names_and_Loading.html" class="tocviewlink" data-pltdoc="x">Module Names and Loading</a></td></tr><tr><td align="right">14.5&nbsp;</td><td><a href="chaperones.html" class="tocviewlink" data-pltdoc="x">Impersonators and Chaperones</a></td></tr><tr><td align="right">14.6&nbsp;</td><td><a href="securityguards.html" class="tocviewlink" data-pltdoc="x">Security Guards</a></td></tr><tr><td align="right">14.7&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Custodians</a></td></tr><tr><td align="right">14.8&nbsp;</td><td><a href="threadgroups.html" class="tocviewlink" data-pltdoc="x">Thread Groups</a></td></tr><tr><td align="right">14.9&nbsp;</td><td><a href="inspectors.html" class="tocviewlink" data-pltdoc="x">Structure Inspectors</a></td></tr><tr><td align="right">14.10&nbsp;</td><td><a href="modprotect.html" class="tocviewlink" data-pltdoc="x">Code Inspectors</a></td></tr><tr><td align="right">14.11&nbsp;</td><td><a href="plumbers.html" class="tocviewlink" data-pltdoc="x">Plumbers</a></td></tr><tr><td align="right">14.12&nbsp;</td><td><a href="Sandboxed_Evaluation.html" class="tocviewlink" data-pltdoc="x">Sandboxed Evaluation</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">custodian?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-custodian%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>custodian</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-shutdown-all%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">custodian-<wbr></wbr>shutdown-<wbr></wbr>all</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._current-custodian%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>custodian</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-managed-list%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">custodian-<wbr></wbr>managed-<wbr></wbr>list</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-memory-accounting-available~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">custodian-<wbr></wbr>memory-<wbr></wbr>accounting-<wbr></wbr>available?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-require-memory%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">custodian-<wbr></wbr>require-<wbr></wbr>memory</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-limit-memory%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">custodian-<wbr></wbr>limit-<wbr></wbr>memory</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-custodian-box%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>custodian-<wbr></wbr>box</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-box~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">custodian-<wbr></wbr>box?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-box-value%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">custodian-<wbr></wbr>box-<wbr></wbr>value</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="securityguards.html" title="backward to &quot;14.6 Security Guards&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="security.html" title="up to &quot;14 Reflection and Security&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="threadgroups.html" title="forward to &quot;14.8 Thread Groups&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h4 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-part-tag="&quot;custodians&quot;">14.7<tt>&nbsp;</tt><a name="(part._custodians)"></a>Custodians</h4><p>See <a href="eval-model.html#%28part._custodian-model%29" data-pltdoc="x">Custodians</a> for basic information on the Racket
custodian model.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._custodian~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">custodian?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a <a href="eval-model.html#%28tech._custodian%29" class="techoutside" data-pltdoc="x"><span class="techinside">custodian</span></a> value,
<span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._make-custodian))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-custodian%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-custodian</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">cust</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">cust</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-custodian%29%29" class="RktValLink" data-pltdoc="x">current-custodian</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a new custodian that is subordinate to <span class="RktVar">cust</span>. When
<span class="RktVar">cust</span> is directed (via <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-shutdown-all%29%29" class="RktValLink" data-pltdoc="x">custodian-shutdown-all</a></span>) to
shut down all of its managed values, the new subordinate custodian is
automatically directed to shut down its managed values as well.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._custodian-shutdown-all))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-shutdown-all%29%29" class="RktValDef RktValLink" data-pltdoc="x">custodian-shutdown-all</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">cust</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">cust</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>In <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&amp;rel=index.html&amp;version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/base</span></a>,
<a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&amp;rel=windowing-overview.html%23%2528tech._eventspace%2529&amp;version=6.1" class="techoutside Sq" data-pltdoc="x"><span class="techinside">eventspaces</span></a> managed by <span class="RktVar">cust</span> are also
shut down.</p></blockquote></blockquote></blockquote></div></p><p>Closes all <a href="file-ports.html#%28tech._file._stream._port%29" class="techoutside" data-pltdoc="x"><span class="techinside">file-stream ports</span></a>, <a href="tcp.html#%28tech._tcp._port%29" class="techoutside" data-pltdoc="x"><span class="techinside">TCP ports</span></a>, <a href="tcp.html#%28tech._tcp._listener%29" class="techoutside" data-pltdoc="x"><span class="techinside">TCP
listeners</span></a>, and <a href="udp.html#%28tech._udp._socket%29" class="techoutside" data-pltdoc="x"><span class="techinside">UDP sockets</span></a> that are managed by <span class="RktVar">cust</span>
(and its subordinates), and empties all <a href="eval-model.html#%28tech._custodian._box%29" class="techoutside" data-pltdoc="x"><span class="techinside">custodian box</span></a>es
associated with <span class="RktVar">cust</span> (and its subordinates). It also removes
<span class="RktVar">cust</span> (and its subordinates) as managers of all threads; when
a thread has no managers, it is killed (or suspended; see
<span class="RktSym"><a href="threads.html#%28def._%28%28quote._~23~25kernel%29._thread%2Fsuspend-to-kill%29%29" class="RktValLink" data-pltdoc="x">thread/suspend-to-kill</a></span>) If the current thread is to be
killed, all other shut-down actions take place before killing the
thread.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._current-custodian))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-custodian%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-custodian</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-custodian%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-custodian</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">cust</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">cust</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>Custodians also manage <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&amp;rel=windowing-overview.html%23%2528tech._eventspace%2529&amp;version=6.1" class="techoutside Sq" data-pltdoc="x"><span class="techinside">eventspaces</span></a>
from <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&amp;rel=index.html&amp;version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/base</span></a>.</p></blockquote></blockquote></blockquote></div></p><p>A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines a custodian that assumes responsibility
for newly created threads, <a href="file-ports.html#%28tech._file._stream._port%29" class="techoutside" data-pltdoc="x"><span class="techinside">file-stream ports</span></a>, TCP ports,
<a href="tcp.html#%28tech._tcp._listener%29" class="techoutside" data-pltdoc="x"><span class="techinside">TCP listeners</span></a>, <a href="udp.html#%28tech._udp._socket%29" class="techoutside" data-pltdoc="x"><span class="techinside">UDP sockets</span></a>, and <a href="bytestrings.html#%28tech._byte._converter%29" class="techoutside" data-pltdoc="x"><span class="techinside">byte converters</span></a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._custodian-managed-list))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-managed-list%29%29" class="RktValDef RktValLink" data-pltdoc="x">custodian-managed-list</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">cust</span><span class="hspace">&nbsp;</span><span class="RktVar">super</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">cust</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">super</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a list of immediately managed objects (not including
<a href="eval-model.html#%28tech._custodian._box%29" class="techoutside" data-pltdoc="x"><span class="techinside">custodian box</span></a>es) and subordinate custodians for <span class="RktVar">cust</span>,
where <span class="RktVar">cust</span> is itself subordinate to <span class="RktVar">super</span> (directly
or indirectly). If <span class="RktVar">cust</span> is not strictly subordinate to
<span class="RktVar">super</span>, the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._custodian-memory-accounting-available~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-memory-accounting-available~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">custodian-memory-accounting-available?</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>Memory accounting is normally available in Racket 3m,
which is the main variant of Racket, and not normally available in
Racket CGC.</p></blockquote></blockquote></blockquote></div></p><p>Returns <span class="RktVal">#t</span> if Racket is compiled with support for
per-custodian memory accounting, <span class="RktVal">#f</span> otherwise.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._custodian-require-memory))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-require-memory%29%29" class="RktValDef RktValLink" data-pltdoc="x">custodian-require-memory</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">limit-cust</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">need-amt</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">stop-cust</span><span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">limit-cust</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">need-amt</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">stop-cust</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Registers a required-memory check if Racket is compiled with
support for per-custodian memory accounting, otherwise the
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aunsupported%29%29" class="RktValLink" data-pltdoc="x">exn:fail:unsupported</a></span> exception is raised.</div></p><p>If a check is registered, and if Racket later reaches a state after
garbage collection (see <a href="eval-model.html#%28part._gc-model%29" data-pltdoc="x">Garbage Collection</a>) where allocating
<span class="RktVar">need-amt</span> bytes charged to <span class="RktVar">limit-cust</span> would fail or
trigger some shutdown, then <span class="RktVar">stop-cust</span> is shut down.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._custodian-limit-memory))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-limit-memory%29%29" class="RktValDef RktValLink" data-pltdoc="x">custodian-limit-memory</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">limit-cust</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">limit-amt</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span>[</td><td><span class="RktVar">stop-cust</span>]<span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">limit-cust</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">limit-amt</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">stop-cust</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVar">limit-cust</span></td></tr></table></blockquote></div><div class="SIntrapara">Registers a limited-memory check if Racket is compiled with
support for per-custodian memory accounting, otherwise the
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aunsupported%29%29" class="RktValLink" data-pltdoc="x">exn:fail:unsupported</a></span> exception is raised.</div></p><p>If a check is registered, and if Racket later reaches a state
after garbage collection (see <a href="eval-model.html#%28part._gc-model%29" data-pltdoc="x">Garbage Collection</a>) where
<span class="RktVar">limit-cust</span> owns more than <span class="RktVar">limit-amt</span> bytes, then
<span class="RktVar">stop-cust</span> is shut down.</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>A custodian&rsquo;s limit is checked only after a garbage
collection, except that it may also be checked during
certain large allocations that are individually larger
than the custodian&rsquo;s limit. A single garbage collection
may shut down multiple custodians, even if shutting down
only one of the custodians would have reduced memory use
for other custodians.</p></blockquote></blockquote></blockquote><p>For reliable shutdown, <span class="RktVar">limit-amt</span> for
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-limit-memory%29%29" class="RktValLink" data-pltdoc="x">custodian-limit-memory</a></span> must be much lower than the total
amount of memory available (minus the size of memory that is
potentially used and not charged to <span class="RktVar">limit-cust</span>). Moreover, if
individual allocations that are initially charged to
<span class="RktVar">limit-cust</span> can be arbitrarily large, then <span class="RktVar">stop-cust</span>
must be the same as <span class="RktVar">limit-cust</span>, so that excessively large
immediate allocations can be rejected with an
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aout-of-memory%29%29" class="RktValLink" data-pltdoc="x">exn:fail:out-of-memory</a></span> exception.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._make-custodian-box))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-custodian-box%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-custodian-box</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">cust</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-box~3f%29%29" class="RktValLink" data-pltdoc="x">custodian-box?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">cust</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian~3f%29%29" class="RktValLink" data-pltdoc="x">custodian?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <a href="eval-model.html#%28tech._custodian._box%29" class="techoutside" data-pltdoc="x"><span class="techinside">custodian box</span></a> that contains <span class="RktVar">v</span> as long as
<span class="RktVar">cust</span> has not been shut down.</div></p><p>A <a href="eval-model.html#%28tech._custodian._box%29" class="techoutside" data-pltdoc="x"><span class="techinside">custodian box</span></a> is a <a href="sync.html#%28tech._synchronizable._event%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronizable event</span></a> (see <a href="sync.html" data-pltdoc="x">Events</a>).
The <a href="eval-model.html#%28tech._custodian._box%29" class="techoutside" data-pltdoc="x"><span class="techinside">custodian box</span></a> becomes ready when its custodian is shut down;
the <a href="sync.html#%28tech._synchronization._result%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronization result</span></a> of a <a href="eval-model.html#%28tech._custodian._box%29" class="techoutside" data-pltdoc="x"><span class="techinside">custodian box</span></a> is the <a href="eval-model.html#%28tech._custodian._box%29" class="techoutside" data-pltdoc="x"><span class="techinside">custodian box</span></a> itself.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._custodian-box~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-box~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">custodian-box?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if
<span class="RktVar">v</span> is a <a href="eval-model.html#%28tech._custodian._box%29" class="techoutside" data-pltdoc="x"><span class="techinside">custodian box</span></a> produced by
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-custodian-box%29%29" class="RktValLink" data-pltdoc="x">make-custodian-box</a></span>, <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._custodian-box-value))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-box-value%29%29" class="RktValDef RktValLink" data-pltdoc="x">custodian-box-value</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">cb</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">cb</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._custodian-box~3f%29%29" class="RktValLink" data-pltdoc="x">custodian-box?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the
value in the given <a href="eval-model.html#%28tech._custodian._box%29" class="techoutside" data-pltdoc="x"><span class="techinside">custodian box</span></a>, or <span class="RktVal">#f</span> if the value
has been removed.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="securityguards.html" title="backward to &quot;14.6 Security Guards&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="security.html" title="up to &quot;14 Reflection and Security&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="threadgroups.html" title="forward to &quot;14.8 Thread Groups&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>