Skip to content

Commit 400a929

Browse files
committed
Action doc commit
1 parent 8bd11b7 commit 400a929

File tree

3 files changed

+27
-33
lines changed

3 files changed

+27
-33
lines changed

docs/clojure.core.async.flow.html

+24-31
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html PUBLIC ""
22
"">
3-
<html><head><meta charset="UTF-8" /><title>clojure.core.async.flow documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name"></span> <span class="project-version"></span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="flow.html"><div class="inner"><span>core.async.flow</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1 "><a href="clojure.core.async.html"><div class="inner"><span>clojure.core.async</span></div></a></li><li class="depth-1 current"><a href="clojure.core.async.flow.html"><div class="inner"><span>clojure.core.async.flow</span></div></a></li><li class="depth-1 "><a href="clojure.core.async.flow.spi.html"><div class="inner"><span>clojure.core.async.flow.spi</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clojure.core.async.flow.html#var-command-proc"><div class="inner"><span>command-proc</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-create-flow"><div class="inner"><span>create-flow</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-futurize"><div class="inner"><span>futurize</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-inject"><div class="inner"><span>inject</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-lift*-.3Estep"><div class="inner"><span>lift*-&gt;step</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-lift1-.3Estep"><div class="inner"><span>lift1-&gt;step</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-pause"><div class="inner"><span>pause</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-pause-proc"><div class="inner"><span>pause-proc</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-ping"><div class="inner"><span>ping</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-ping-proc"><div class="inner"><span>ping-proc</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-process"><div class="inner"><span>process</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-resume"><div class="inner"><span>resume</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-resume-proc"><div class="inner"><span>resume-proc</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-start"><div class="inner"><span>start</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-step-process"><div class="inner"><span>step-process</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-stop"><div class="inner"><span>stop</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clojure.core.async.flow</h1><div class="doc"><pre class="plaintext">
3+
<html><head><meta charset="UTF-8" /><title>clojure.core.async.flow documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name"></span> <span class="project-version"></span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="flow.html"><div class="inner"><span>core.async.flow</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1 "><a href="clojure.core.async.html"><div class="inner"><span>clojure.core.async</span></div></a></li><li class="depth-1 current"><a href="clojure.core.async.flow.html"><div class="inner"><span>clojure.core.async.flow</span></div></a></li><li class="depth-1 "><a href="clojure.core.async.flow.spi.html"><div class="inner"><span>clojure.core.async.flow.spi</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clojure.core.async.flow.html#var-command-proc"><div class="inner"><span>command-proc</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-create-flow"><div class="inner"><span>create-flow</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-futurize"><div class="inner"><span>futurize</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-inject"><div class="inner"><span>inject</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-lift*-.3Estep"><div class="inner"><span>lift*-&gt;step</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-lift1-.3Estep"><div class="inner"><span>lift1-&gt;step</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-pause"><div class="inner"><span>pause</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-pause-proc"><div class="inner"><span>pause-proc</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-ping"><div class="inner"><span>ping</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-ping-proc"><div class="inner"><span>ping-proc</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-process"><div class="inner"><span>process</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-resume"><div class="inner"><span>resume</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-resume-proc"><div class="inner"><span>resume-proc</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-start"><div class="inner"><span>start</span></div></a></li><li class="depth-1"><a href="clojure.core.async.flow.html#var-stop"><div class="inner"><span>stop</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clojure.core.async.flow</h1><div class="doc"><pre class="plaintext">
44
Note - Alpha, work-in-progress, names and other details are in flux
55

66
A library for building concurrent, event driven data processing
@@ -74,20 +74,27 @@
7474
input or output of the process, returning a future that will
7575
complete when done.</pre></div></div><div class="public anchor" id="var-lift*-.3Estep"><h3>lift*-&gt;step</h3><div class="usage"><code>(lift*-&gt;step f)</code></div><div class="doc"><pre class="plaintext">given a fn f taking one arg and returning a collection of non-nil
7676
values, create a 'step' fn as needed by step-process, with one input
77-
and one output (named :in and :out), and no state.</pre></div></div><div class="public anchor" id="var-lift1-.3Estep"><h3>lift1-&gt;step</h3><div class="usage"><code>(lift1-&gt;step f)</code></div><div class="doc"><pre class="plaintext">like lift*-&gt;step except taking a fn returning one value, which, when
78-
nil, will yield no output.</pre></div></div><div class="public anchor" id="var-pause"><h3>pause</h3><div class="usage"><code>(pause g)</code></div><div class="doc"><pre class="plaintext">pauses a running flow
77+
and one output (named :in and :out), and no state.</pre></div></div><div class="public anchor" id="var-lift1-.3Estep"><h3>lift1-&gt;step</h3><div class="usage"><code>(lift1-&gt;step f)</code></div><div class="doc"><pre class="plaintext">like lift*-&gt;step except taking a fn returning one value, which when
78+
nil will yield no output.</pre></div></div><div class="public anchor" id="var-pause"><h3>pause</h3><div class="usage"><code>(pause g)</code></div><div class="doc"><pre class="plaintext">pauses a running flow
7979
</pre></div></div><div class="public anchor" id="var-pause-proc"><h3>pause-proc</h3><div class="usage"><code>(pause-proc g pid)</code></div><div class="doc"><pre class="plaintext">pauses a process
80-
</pre></div></div><div class="public anchor" id="var-ping"><h3>ping</h3><div class="usage"><code>(ping g)</code></div><div class="doc"><pre class="plaintext">pings all processes, which will put their status and state on the
81-
report channel returned from start</pre></div></div><div class="public anchor" id="var-ping-proc"><h3>ping-proc</h3><div class="usage"><code>(ping-proc g pid)</code></div><div class="doc"><pre class="plaintext">pings the process, which will put its status and state on the report
82-
channel returned from start</pre></div></div><div class="public anchor" id="var-process"><h3>process</h3><div class="usage"><code>(process process-impl-map)</code><code>(process process-impl-map {:keys [workload timeout-ms], :or {timeout-ms 5000}, :as opts})</code></div><div class="doc"><pre class="plaintext">Given a map of functions (described below), returns a launcher that
80+
</pre></div></div><div class="public anchor" id="var-ping"><h3>ping</h3><div class="usage"><code>(ping g &amp; {:keys [timeout-ms], :or {timeout-ms 1000}})</code></div><div class="doc"><pre class="plaintext">pings all processes, returning a map of pid -&gt; proc status and
81+
state, for those procs that reply within timeout-ms (default 1000)</pre></div></div><div class="public anchor" id="var-ping-proc"><h3>ping-proc</h3><div class="usage"><code>(ping-proc g pid &amp; {:keys [timeout-ms], :or {timeout-ms 1000}})</code></div><div class="doc"><pre class="plaintext">like ping, but just pings the specified process
82+
</pre></div></div><div class="public anchor" id="var-process"><h3>process</h3><div class="usage"><code>(process fn-or-map)</code><code>(process fn-or-map {:keys [workload timeout-ms], :or {timeout-ms 5000}, :as opts})</code></div><div class="doc"><pre class="plaintext">Given a function of four arities (0-3), or a map of functions
83+
corresponding thereto (described below), returns a launcher that
8384
creates a process compliant with the process protocol (see the
84-
spi/ProcLauncher doc). The possible entries for process-impl-map
85-
are :describe, :init, :transition and :transform. This is
86-
the core facility for defining the logic for processes via ordinary
87-
functions.
88-
89-
:describe - required, () -&gt; desc
90-
where desc is a map with keys :params :ins and :outs, each of which
85+
spi/ProcLauncher doc).
86+
87+
The possible arities/entries for fn/map are 0 - :describe, 1
88+
- :init, 2 - :transition and 3 - :transform. This is the core
89+
facility for defining the logic for processes via ordinary
90+
functions. Using a var holding a fn as the 'fn' is the preferred
91+
method for defining a proc, as it enables hot-code-reloading of the
92+
proc logic in a flow, and better names in datafy. You can use the
93+
map form to compose the proc logic from disparate functions or to
94+
leverage the optionality of some of the entry points.
95+
96+
arity 0, or :describe - required, () -&gt; description
97+
where description is a map with keys :params :ins and :outs, each of which
9198
in turn is a map of keyword to doc string, and :workload with
9299
possible values of :mixed :io :compute. All entries in the describe
93100
return map are optional.
@@ -106,7 +113,7 @@
106113
the proc. It will also be called by the impl in order to discover
107114
what channels are needed.
108115

109-
:init - optional, (arg-map) -&gt; initial-state
116+
arity 1, or :init - optional, (arg-map) -&gt; initial-state
110117

111118
init will be called once by the process to establish any initial
112119
state. The arg-map will be a map of param-&gt;val, as supplied in the
@@ -127,7 +134,7 @@
127134
will be part of the next channel read set. In the absence of this
128135
predicate all inputs are read.
129136

130-
:transition - optional, (state transition) -&gt; state'
137+
arity 2, or :transition - optional, (state transition) -&gt; state'
131138

132139
transition will be called when the process makes a state transition,
133140
transition being one of ::flow/resume, ::flow/pause or ::flow/stop
@@ -137,7 +144,7 @@
137144
process will no longer be used following that. See the SPI for
138145
details. state' will be the state supplied to subsequent calls.
139146

140-
:transform - required, (state in-name msg) -&gt; [state' output]
147+
arity 3, or :transform - required, (state in-name msg) -&gt; [state' output]
141148
where output is a map of outid-&gt;[msgs*]
142149

143150
The transform fn will be called every time a message arrives at any
@@ -184,19 +191,5 @@
184191
exceptions thrown anywhere on any thread inside a flow will appear
185192
in maps sent here. There will at least be a ::flow/ex entry with the
186193
exception, and may be additional keys for pid, state, status etc
187-
depending on the context of the error.</pre></div></div><div class="public anchor" id="var-step-process"><h3>step-process</h3><div class="usage"><code>(step-process f)</code><code>(step-process f opts)</code></div><div class="doc"><pre class="plaintext">Given a (e.g. communication-free) step function f of three
188-
arities (described below), and the same opts as 'process', returns a
189-
launcher that creates a process compliant with the process
190-
protocol (see 'process').
191-
192-
The arities of f are:
193-
194-
()-&gt;desc
195-
a function matching the semantics of process' :describe
196-
197-
(arg-map)-&gt;initial-state
198-
a function matching the semantics of process' :init
199-
200-
(state in-name msg)-&gt;[state' output]
201-
a function matching the semantics of process' :transform</pre></div></div><div class="public anchor" id="var-stop"><h3>stop</h3><div class="usage"><code>(stop g)</code></div><div class="doc"><pre class="plaintext">shuts down the flow, stopping all procsesses and closing the error
194+
depending on the context of the error.</pre></div></div><div class="public anchor" id="var-stop"><h3>stop</h3><div class="usage"><code>(stop g)</code></div><div class="doc"><pre class="plaintext">shuts down the flow, stopping all procsesses and closing the error
202195
and report channels. The flow can be started again</pre></div></div></div></body></html>

docs/clojure.core.async.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@
8181
buffer must be specified. ex-handler must be a fn of one argument -
8282
if an exception occurs during transformation it will be called with
8383
the Throwable as an argument, and any non-nil return value will be
84-
placed in the channel.</pre></div></div><div class="public anchor" id="var-close.21"><h3>close!</h3><div class="usage"><code>(close! chan)</code></div><div class="doc"><pre class="plaintext">Closes a channel. The channel will no longer accept any puts (they
84+
placed in the channel. Channels implement Datafiable; use datafy
85+
to obtain the state of the channel and its buffer.</pre></div></div><div class="public anchor" id="var-close.21"><h3>close!</h3><div class="usage"><code>(close! chan)</code></div><div class="doc"><pre class="plaintext">Closes a channel. The channel will no longer accept any puts (they
8586
will be ignored). Data in the channel remains available for taking, until
8687
exhausted, after which takes will return nil. If there are any
8788
pending takes, they will be dispatched with nil. Closing a closed

0 commit comments

Comments
 (0)