Skip to content

Commit

Permalink
service: Wait TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel committed Aug 8, 2020
1 parent 0defcd2 commit ff66974
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ func (s *service) lock() {
s.checkCancelFn()
// We should give it little bit of time to finish checking after the cancel
// otherwise it might error trying to write to a closed database.
// We could use a WaitGroup with a timeout or channels but polling is simple.
// This wait isn't strictly required but we do it to be nice.
// TODO: Use a WaitGroup with a timeout or channel
for i := 0; i < 100; i++ {
if !s.checking {
break
Expand Down

0 comments on commit ff66974

Please sign in to comment.