refactor: camelCase — waitgroup → waitGroup
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
d5f295cb7d
commit
e17217a630
3 changed files with 3 additions and 3 deletions
|
|
@ -33,7 +33,7 @@ type Core struct {
|
|||
context context.Context
|
||||
cancel context.CancelFunc
|
||||
taskIDCounter atomic.Uint64
|
||||
waitgroup sync.WaitGroup
|
||||
waitGroup sync.WaitGroup
|
||||
shutdown atomic.Bool
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ func (c *Core) ServiceShutdown(ctx context.Context) Result {
|
|||
// Drain background tasks before stopping services.
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
c.waitgroup.Wait()
|
||||
c.waitGroup.Wait()
|
||||
close(done)
|
||||
}()
|
||||
select {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ func (c *Core) PerformAsync(t Task) Result {
|
|||
tid.SetTaskIdentifier(taskID)
|
||||
}
|
||||
c.ACTION(ActionTaskStarted{TaskIdentifier: taskID, Task: t})
|
||||
c.waitgroup.Go(func() {
|
||||
c.waitGroup.Go(func() {
|
||||
defer func() {
|
||||
if rec := recover(); rec != nil {
|
||||
err := E("core.PerformAsync", Sprint("panic: ", rec), nil)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue