|
83 | 83 | |
84 | 84 | ::flow/report-chan - a core.async chan for reading.'ping' reponses |
85 | 85 | will show up here, as will any explicit ::flow/report outputs |
86 | | - from :transform/:inject |
| 86 | + from :transform/:introduce |
87 | 87 | |
88 | 88 | ::flow/error-chan - a core.async chan for reading. Any (and only) |
89 | 89 | exceptions thrown anywhere on any thread inside a flow will appear |
|
138 | 138 | "Given a map of functions (described below), returns a launcher that |
139 | 139 | creates a process compliant with the process protocol (see the |
140 | 140 | spi/ProcLauncher doc). The possible entries for process-impl-map |
141 | | - are :describe, :init, :transition, :transform and :inject. This is |
| 141 | + are :describe, :init, :transition, :transform and :introduce. This is |
142 | 142 | the core facility for defining the logic for processes via ordinary |
143 | 143 | functions. |
144 | 144 |
|
|
171 | 171 | process will no longer be used following that. See the SPI for |
172 | 172 | details. state' will be the state supplied to subsequent calls. |
173 | 173 |
|
174 | | - Exactly one of either :transform or :inject are required. |
| 174 | + Exactly one of either :transform or :introduce are required. |
175 | 175 |
|
176 | 176 | :transform - (state in-name msg) -> [state' output] |
177 | 177 | where output is a map of outid->[msgs*] |
|
184 | 184 | may never be nil (per core.async channels). state' will be the state |
185 | 185 | supplied to subsequent calls. |
186 | 186 |
|
187 | | - :inject - (state) -> [state' output] |
| 187 | + :introduce - (state) -> [state' output] |
188 | 188 | where output is a map of outid->[msgs*], per :transform |
189 | 189 | |
190 | | - The inject fn is used for sources - proc-impls that inject new data |
| 190 | + The introduce fn is used for sources - proc-impls that introduce new data |
191 | 191 | into the flow by doing I/O with something external to the flow and |
192 | | - feeding that data to its outputs. A proc-impl specifying :inject may not |
| 192 | + feeding that data to its outputs. A proc-impl specifying :introduce may not |
193 | 193 | specify any :ins in its descriptor, as none but the ::flow/control channel |
194 | | - will be read. Instead, inject will be called every time through the |
| 194 | + will be read. Instead, introduce will be called every time through the |
195 | 195 | process loop, and will presumably do blocking or paced I/O to get |
196 | 196 | new data to return via its outputs. If it does blocking I/O it |
197 | 197 | should do so with a timeout so it can regularly return to the |
198 | 198 | process loop which can then look for control messages - it's fine |
199 | | - for inject to return with no output. Do not spin poll in the inject |
| 199 | + for introduce to return with no output. Do not spin poll in the introduce |
200 | 200 | fn. |
201 | 201 |
|
202 | 202 | proc accepts an option map with keys: |
|
205 | 205 | will be used when getting the return from the future - see below |
206 | 206 |
|
207 | 207 | The :compute context is not allowed for proc impls that |
208 | | - provide :inject (as I/O is presumed). |
| 208 | + provide :introduce (as I/O is presumed). |
209 | 209 |
|
210 | 210 | In the :exec context of :mixed or :io, this dictates the type of |
211 | 211 | thread in which the process loop will run, _including its calls to |
212 | | - transform/inject_. |
| 212 | + transform/introduce_. |
213 | 213 |
|
214 | | - When :io is specified transform/inject should not do extensive computation. |
| 214 | + When :io is specified transform/introduce should not do extensive computation. |
215 | 215 |
|
216 | 216 | When :compute is specified (only allowed for :transform), each call |
217 | 217 | to transform will be run in a separate thread. The process loop will |
|
0 commit comments