- Companion:
- class
Value members
Concrete methods
Easy helper for custom signals. See CustomSignalSource for docs.
Easy helper for custom signals. See CustomSignalSource for docs.
Provide start
and stop
callbacks that will be called when the signal
is started and stopped. E.g. create some resource on start, clean it on stop.
The arguments to start
are functions. Call them to do things like update the
signal's value, read its current value, or get some info:
getStartIndex
returns 1
the first time the signal is started, and is
incremented every time it is started again after being stopped.
getIsStarted
is a function that you can call any time, including
after some delay, to check if the signal is still started, e.g. if
you don't want to update the signal's value if the signal is stopped.
- Value parameters:
- stop
MUST NOT THROW!
The signal will start with None
, even if the future is already resolved.
Once the future resolves (or after a minimal async delay if it's already resolved),
the signal's value will be updated to the future's resolved value.
The signal will start with None
, even if the future is already resolved.
Once the future resolves (or after a minimal async delay if it's already resolved),
the signal's value will be updated to the future's resolved value.
The signal will start with the provided initial
value, even if the future is already resolved.
Once the future resolves (or after a minimal async delay if it's already resolved),
the signal's value will be updated to the future's resolved value.
The signal will start with the provided initial
value, even if the future is already resolved.
Once the future resolves (or after a minimal async delay if it's already resolved),
the signal's value will be updated to the future's resolved value.
The signal will start with None
, even if the promise is already resolved.
Once the promise resolves (or after a minimal async delay if it's already resolved),
the signal's value will be updated to the promise's resolved value.
The signal will start with None
, even if the promise is already resolved.
Once the promise resolves (or after a minimal async delay if it's already resolved),
the signal's value will be updated to the promise's resolved value.
The signal will start with the provided initial
value, even if the promise is already resolved.
Once the promise resolves (or after a minimal async delay if it's already resolved),
the signal's value will be updated to the promise's resolved value.
The signal will start with the provided initial
value, even if the promise is already resolved.
Once the promise resolves (or after a minimal async delay if it's already resolved),
the signal's value will be updated to the promise's resolved value.
Implicits
Implicits
Provides methods on Signal: combine, combineWith, withCurrentValueOf, sample
Provides methods on Signal: combine, combineWith, withCurrentValueOf, sample
Provides signal-specific debug* methods: debugSpyInitialEval, debugLogInitialEval, debugBreakInitialEval
Provides signal-specific debug* methods: debugSpyInitialEval, debugLogInitialEval, debugBreakInitialEval
Provides methods on Signal companion object: combine, combineWith
Provides methods on Signal companion object: combine, combineWith