From b0dd84f18d889bb9ed5d60ed1e7319040ea3c9a0 Mon Sep 17 00:00:00 2001 From: Ghadi Shayban Date: Wed, 30 Oct 2024 12:36:46 -0400 Subject: [PATCH] core.async guide: call out proper usage of channel transducers --- content/reference/async.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/reference/async.adoc b/content/reference/async.adoc index 2a367a8e..1a8a7fbf 100644 --- a/content/reference/async.adoc +++ b/content/reference/async.adoc @@ -24,7 +24,7 @@ Channels are queues that carry values and support multiple writers and readers. Channels are first-class values that can be passed around like any other value. -Channels may optionally be supplied with a <> 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). +Channels may optionally be supplied with a <> 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. 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).