Skip to content

Commit

Permalink
make critical section shorter
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Dec 10, 2023
1 parent 733c564 commit e7622ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/animation/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ type Runner struct {
// Start will register the passed application and initiate its ticking.
func (r *Runner) Start(a *fyne.Animation) {
r.animationMutex.Lock()
defer r.animationMutex.Unlock()

r.pendingAnimations = append(r.pendingAnimations, newAnim(a))
r.animationMutex.Unlock()

if !r.runnerStarted {
r.runnerStarted = true
r.runAnimations()
Expand Down

0 comments on commit e7622ce

Please sign in to comment.