Skip to content

Commit f7737ba

Browse files
authored
Merge pull request #704 from ghadishayban/patch-1
core.async guide: call out proper usage of channel transducers
2 parents 33c1b38 + b0dd84f commit f7737ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/reference/async.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Channels are queues that carry values and support multiple writers and readers.
2424

2525
Channels are first-class values that can be passed around like any other value.
2626

27-
Channels may optionally be supplied with a <<transducers#,transducer>> and an exception handler. The transducer will be applied to values that pass through the channel. If a transducer is supplied, the channel *must* be buffered (transducers can create intermediate values that must be stored somewhere).
27+
Channels may optionally be supplied with a <<transducers#,transducer>> and an exception handler. The transducer will be applied to values that pass through the channel. If a transducer is supplied, the channel *must* be buffered (transducers can create intermediate values that must be stored somewhere). Channel transducers must not block, whether by issuing i/o operations or by externally synchronizing, else risk impeding or deadlocking go blocks.
2828

2929
The `ex-handler` is a function of one argument (a Throwable). If an exception occurs while applying the transducer, the `ex-handler` will be invoked, and any non-nil return value will be placed in the channel. If no `ex-handler` is supplied, exceptions will flow and be handled where they occur (note that this may in either the writer or reader thread depending on the operation and the state of the buffer).
3030

0 commit comments

Comments
 (0)