Home

ACSignal

ACSignal is a lightweight abstraction used in reactive programming libraries to model an asynchronous sequence of values over time. An ACSignal may emit zero or more values, followed by a completion event or an error. Signals decouple producers from consumers: the code that creates a signal does not need to know which code will handle its emissions. Signals can deliver events synchronously or asynchronously, depending on configuration or the scheduler in use.

Subscribers attach handlers by subscribing to the signal. A subscription provides callbacks for next values, errors,

ACSignal is used in various reactive programming ecosystems. It is conceptually similar to signal types in

and
completion.
Signals
are
typically
immutable
and
composed
with
operators
to
transform,
filter,
merge,
or
combine
streams.
Common
operators
include
map,
filter,
and
flatMap.
The
lifecycle
of
a
subscription
is
managed
by
a
disposable
token;
disposing
cancels
work
and
stops
further
events.
Many
implementations
support
delivering
events
on
a
specific
thread
or
queue
to
coordinate
UI
updates
or
background
processing.
other
frameworks,
such
as
RACSignal
in
ReactiveCocoa
and
Publisher
types
in
newer
reactive
libraries.
Advocates
cite
improved
composability
and
testability,
while
critics
note
added
indirection.
Adoption
typically
involves
selecting
a
library
that
provides
ACSignal-compatible
operators
and
schedulers
and
integrating
with
existing
asynchronous
code.