Skip to content

Commit bf3c034

Browse files
committed
more docs on 'start' return, typos
1 parent 5b086bc commit bf3c034

File tree

1 file changed

+14
-6
lines changed
  • src/main/clojure/clojure/core/async

1 file changed

+14
-6
lines changed

src/main/clojure/clojure/core/async/flow.clj

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
supply ids for processes, inputs, outputs etc. These should be
3939
keywords. When a namespaced keyword is required it is explicitly
4040
stated. This documentation refers to various keywords utilized by
41-
the library itself as ::flow/xyz, weere ::flow is an alias for
41+
the library itself as ::flow/xyz, where ::flow is an alias for
4242
clojure.core.async.flow
4343
4444
A process is represented in the flow definition by an implementation
@@ -79,9 +79,17 @@
7979

8080
(defn start
8181
"starts the entire flow from init values. The processes start paused.
82-
Call resume or resume-proc to start flow.
83-
returns {::flow/report-chan - a core.async chan for reading
84-
::flow/error-chan - a core.async chan for reading}"
82+
Call 'resume' or 'resume-proc' to start flow. returns a map with keys:
83+
84+
::flow/report-chan - a core.async chan for reading.'ping' reponses
85+
will show up here, as will any explicit ::flow/report outputs
86+
from :transform/:inject
87+
88+
::flow/error-chan - a core.async chan for reading. Any (and only)
89+
exceptions thrown anywhere on any thread inside a flow will appear
90+
in maps sent here. There will at least be a ::flow/ex entry with the
91+
exception, and may be additional keys for pid, state, status etc
92+
depending on the context of the error."
8593
[g] (g/start g))
8694

8795
(defn stop
@@ -99,7 +107,7 @@
99107

100108
(defn ping
101109
"pings all processes, which will put their status and state on the
102-
report channel"
110+
report channel returned from start"
103111
[g] (g/ping g))
104112

105113
(defn pause-proc
@@ -112,7 +120,7 @@
112120

113121
(defn ping-proc
114122
"pings the process, which will put its status and state on the report
115-
channel"
123+
channel returned from start"
116124
[g pid] (g/ping-proc g pid))
117125

118126
(defn command-proc

0 commit comments

Comments
 (0)