-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid cloning
Config
and mutable state
Prior to this commit, configs are shared between at least two structs without any nice way to coordinate updates. For the background config, this could lead to expensive clones of an internal HashMap or wrapping the config in an Arc and a Mutex. The latter could lead to lock contention if multiple interfaces are called that need the config. This commit makes use of the portal's messaging passing infrastructure to handle configs cleaner (at least for the background for now). Interface implementations may stall or deadlock with zbus if the function takes `&mut self`. Another benefit of this commit is that the interfaces for the background are now all immutable.
- Loading branch information
1 parent
e99d456
commit 5d6e3f2
Showing
3 changed files
with
74 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters