-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve data races when closing services (#10535)
* avoid logging if context is done * add wait group to block Close until all goroutines return * block Close() for recoverer and registry * block Close() of states store * states store * rename threads -> threadsWG * wg.Add before spawning a goroutine * remove redundant assignment the channel was created in the constructor * added thread control helper * refactor automation services to use common infra for service logic * handle errors while spawning goroutines * block subscriber * remove thread control (was extracted to #10560) * align thread control interface * extract function that requires lock * recoverer: spawn several goroutines for background work * remove redundant log * remove redundant check * removed unused cancel * reset flush ticker * timer to ticker * fix test
- Loading branch information
Showing
8 changed files
with
237 additions
and
287 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
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
Oops, something went wrong.