-
Notifications
You must be signed in to change notification settings - Fork 0
Shared state
Lukas Härtel edited this page Jun 16, 2017
·
1 revision
Kontor Clusters may share a state. Once a state is requested, the oldest member will be asked to provide a serialized version of the state. This behavior is included by registering a state prosumer that produces current state on the sender and consumes received state on the requester. A basic implementation is by holding the state in a mutable property. KMutableProperty0<T>.toProsumer()
can then be used to read the variable's value as the status and write to the variable to store status.