coreos/zincati

Allow concurrent handling of messages to `UpdateAgent` actor

Closed this issue · 0 comments

Currently, the UpdateAgent actor handles all messages synchronously in the order in which the messages are received. This works well for the most part currently as the only messages it handles are RefreshTick and an experimental LastRefresh (mainly for testing purposes).
However, in the future where we have more meaningful D-Bus methods that would like to access the state of the UpdateAgent actor, D-Bus methods should be allowed to be handled concurrently with the UpdateAgent actor's regular ticking. Therefore, we should allow messages sent to the UpdateAgent actor to be handled concurrently, e.g. calling spawn, instead of wait on its Actix context. However, we would still like to have RefreshTick messages handled in sequence. One possible way to achieve this is to use a future-aware lock to lock actor.state.

xref: #514 (comment)