-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce scope of holding ServiceManager.planLock
In most cases we're just reading from m.plan fields (Services, DefaultServiceNames, and so on), so we can use m.Plan(), which holds the plan lock only for the duration of fetch m.plan -- this is safe, because we never mutate what's inside m.plan, we only replace it (in updatePlan). For the cases we are updating the plan (AppendLayer, CombineLayer, SetServiceArgs), we still need acquirePlan. In ServiceManager.ServiceLogs, we don't need to acquire the plan lock at all (m.plan isn't used).
- Loading branch information
Showing
2 changed files
with
23 additions
and
36 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