Separate the dispatch internal state from the immutable Dispatch
object
#57
Labels
part:actor
Affects the dispatching actor
part:dispatcher
Affects the high-level dispatcher interface
type:tech-debt
Improves the project without visible changes for users
Since the
Dispatch
'sdeleted
bool
andrunning_state_change_synced
are only attached as mutable properties for internal state tracking, it might make more sense to separate the state from the immutable dispatch, and have aDispatchState
mutable class and a separatedict
to map dispatch ID to its state, for example.You can pass the state object to the
Dispatch
constructor and store it as a private property and expose read-only properties to access the state, if it needs to be accessed externally, and store thedict
and mutate it from this actor only.Originally posted by @llucax in #54 (comment)
The text was updated successfully, but these errors were encountered: