Skip to content

Commit

Permalink
Add todo's for schedule functions to prevent race in update rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nils Dijk committed Sep 5, 2016
1 parent f1b7c45 commit ded6b51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions swim/schedule.go
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/benbjohnson/clock"
)

// TODO rename to scheduleRepeaditly
func schedule(what func(), delayFn func() time.Duration, clock clock.Clock) chan bool {
stop := make(chan bool)

Expand All @@ -23,3 +24,5 @@ func schedule(what func(), delayFn func() time.Duration, clock clock.Clock) chan

return stop
}

// TODO add schedule once with a quit channel to cancel it for use in the update rollup

0 comments on commit ded6b51

Please sign in to comment.