emacs.d/clones/lisp/www.cliki.net/trivial-package-locks.html
2022-10-07 15:47:14 +02:00

58 lines
No EOL
8.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CLiki: trivial-package-locks</title>
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
href="https://www.cliki.net/site/feed/article.atom?title=trivial-package-locks">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/colorize.css">
</head>
<body>
<span class="hidden">CLiki - trivial-package-locks</span>
<div id="content"><div id="content-area"><div id="article-title">trivial-package-locks</div><div id="article">A standard interface to the various package lock implementations. <p>Currently supported implementations are ACL, CLISP, CMUCL, ECL and SBCL. On all other implementations the following functions are exported but will evaluate to a NOOP where appropriate.<p><h2>Package Locks Interface</h2><p>Implementations that support this interface will have the keyword <code>:package-locks</code> present in <code>*features*</code>.<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen">package-locked-p &amp;optional <span class="paren2">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/syscla_package.html" class="symbol">package</a> <a href="https://www.cliki.net/site/HyperSpec/Body/var_stpackagest.html" class="symbol"><span class="special">*package*</span></a></span>)</span></span>)</span> =&gt; lock-state
<span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/any_setf.html" class="symbol">setf</a> <span class="paren2">(<span class="nonparen">package-locked-p &amp;optional <span class="paren3">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/syscla_package.html" class="symbol">package</a> <a href="https://www.cliki.net/site/HyperSpec/Body/var_stpackagest.html" class="symbol"><span class="special">*package*</span></a></span>)</span></span>)</span> new-lock-state</span>)</span></span></div><p>Accesses the lock state of a package. <code>t</code> indicates that the package is locked and <code>nil</code> indicates that it is not locked.<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen">without-package-locks &amp;body body</span>)</span> =&gt;<span class="comment">; results</span></span></div><p>Disables the checking of package locks during the evaluation of <code>body</code>. For implementations that do not have the ability to disable all package locks via a dynamic variable <code>(list-all-packages)</code> will be used to unlock each package before the evaluation of <code>body</code> and then relock each package that was locked after the evaluation of <code>body</code>.<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen"><i><span class="symbol">with-unlocked-packages</span></i> <span class="paren2">(<span class="nonparen">&amp;rest packages</span>)</span> &amp;body body</span>)</span> =&gt; results</span></div><p>Unlocks and relocks each of the named <code>packages</code> around the evaluation of <code>body</code>.<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen"><i><span class="symbol">with-locked-packages</span></i> <span class="paren2">(<span class="nonparen">&amp;rest packages</span>)</span> &amp;body body</span>)</span> =&gt; results</span></div><p>Locks and then unlocks each of the named <code>packages</code> around the evaluation of <code>body</code>.<p><h2>Implementation Packages Interface</h2><p>Implementations that support this interface will have the keyword <code>:implementation-packages</code> present in <code>*features*</code>. Currently ACL and SBCL are the only implementations that support this interface.<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen">package-implementation-packages <span class="paren2">(<span class="nonparen">&amp;optional <span class="paren3">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/syscla_package.html" class="symbol">package</a> <a href="https://www.cliki.net/site/HyperSpec/Body/var_stpackagest.html" class="symbol"><span class="special">*package*</span></a></span>)</span></span>)</span> =&gt; packages
<span class="paren2">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/any_setf.html" class="symbol">setf</a> <span class="paren3">(<span class="nonparen">package-implementation-packages &amp;optional <span class="paren4">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/syscla_package.html" class="symbol">package</a> <a href="https://www.cliki.net/site/HyperSpec/Body/var_stpackagest.html" class="symbol"><span class="special">*package*</span></a></span>)</span></span>)</span> packages</span>)</span></span></span></span></div><p>Accesses the list of packages that are considered implementation packages of <code>package</code>.<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen">package-implements-package-p <span class="paren2">(<span class="nonparen">implementation-package
&amp;optional <span class="paren3">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/syscla_package.html" class="symbol">package</a> <a href="https://www.cliki.net/site/HyperSpec/Body/var_stpackagest.html" class="symbol"><span class="special">*package*</span></a></span>)</span></span>)</span> =&gt; state
<span class="paren2">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/any_setf.html" class="symbol">setf</a> <span class="paren3">(<span class="nonparen">package-implements-package-p implementation-package
&amp;optional <span class="paren4">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/syscla_package.html" class="symbol">package</a> <a href="https://www.cliki.net/site/HyperSpec/Body/var_stpackagest.html" class="symbol"><span class="special">*package*</span></a></span>)</span></span>)</span>
new-state</span>)</span></span></span></span></div><p>Access the implementation state of an individual package.<p><hr><p>Repository: <a href="https://github.com/yitzchak/trivial-package-locks/">https://github.com/yitzchak/trivial-package-locks/</a><p>Author: <a href="https://github.com/yitzchak">Tarn W. Burton</a><p><hr>
<a href="trivial.html" class="category">trivial</a>, <a href="MIT-LICENSE.html" class="category">MIT-LICENSE</a></div></div>
<div id="footer" class="buttonbar"><ul><li><a href="trivial-package-locks.html">Current version</a></li>
<li><a href="https://www.cliki.net/site/history?article=trivial-package-locks">History</a></li>
<li><a href="https://www.cliki.net/site/backlinks?article=trivial-package-locks">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=trivial-package-locks&amp;from-revision=3849961015">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
</div>
<div id="header-buttons" class="buttonbar">
<ul>
<li><a href="https://www.cliki.net/">Home</a></li>
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
<li><a href="CLiki.html">About</a></li>
<li><a href="Text&#32;Formatting.html">Text Formatting</a></li>
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
</ul>
<div id="search">
<form action="https://www.cliki.net/site/search">
<label for="search_query" class="hidden">Search CLiki</label>
<input type="text" name="query" id="search_query" value="" />
<input type="submit" value="search" />
</form>
</div>
</div>
<div id="pageheader">
<div id="header">
<span id="logo">CLiki</span>
<span id="slogan">the common lisp wiki</span>
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
<label for="login_name" class="hidden">Account name</label>
<input type="text" name="name" id="login_name" class="login_input" />
<label for= "login_password" class="hidden">Password</label>
<input type="password" name="password" id="login_password" class="login_input" />
<input type="submit" name="login" value="login" id="login_submit" /><br />
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
</form>
</div>
</div>
</div>
</body></html>