Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commands: remove mutex from state client list
I was thinking about the locking here yesterday and it dawned on me that we actually don't need this at all: - possible contention between traversing list to send states to state clients and adding new state clients to the list: It is the command handler that adds new state clients to the state client list. The command handler and the code that actually sends out the container states run in the same process so there's not contention and thus no locking needed. - adding state clients to the list from multiple threads: The command handler itself is single-threaded so only one thread's request can be served at the same time so no locking is needed. - sending out the state to state clients via the command handler itself: The state client also adds and removes state clients from the state client list so there's no locking needed. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
- Loading branch information
Christian Brauner
committed
Feb 26, 2018
1 parent
69556ea
commit 328a3f0
Showing
3 changed files
with
0 additions
and
8 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