Transaction

com.raquo.airstream.core.Transaction
See theTransaction companion class
object Transaction

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

object onStart

This object holds a queue of callbacks that should be executed when all observables finish starting. This lets signal.changes streams emit the updated signal's value when restarting, in such a way that the value propagates to all new observers instead of just the first new observer that triggered restart.

This object holds a queue of callbacks that should be executed when all observables finish starting. This lets signal.changes streams emit the updated signal's value when restarting, in such a way that the value propagates to all new observers instead of just the first new observer that triggered restart.

For that to happen, you need to wrap the code that's adding several observers into onStart.shared. We do this in a couple places in Airstream, and in a couple places in Laminar, and this seems to cover most reasonable use cases. Users might need to wrap some of their code into onStart.shared manually if they manage subscriptions manually.

See https://github.com/raquo/Airstream/#restarting-streams-that-depend-on-signals--signalchanges-

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
onStart.type

Value members

Concrete methods

def apply(code: Transaction => Unit): Unit

Create new transaction.

Create new transaction.

Typically used in internal observable code.

Warning: It is rare that end users need to manually create transactions. Example of legitimate use case: Var transaction delay

Attributes