Skip to content

Commit

Permalink
Merge pull request #43 from starskey-io/starskey-alpha-30
Browse files Browse the repository at this point in the history
pager sync comments
  • Loading branch information
guycipher authored Jan 22, 2025
2 parents ae8a168 + 0d06c64 commit 156b6bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pager/pager.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ func (p *Pager) backgroundSync() {
for {
select {
case <-ticker.C:
p.file.Sync()
_ = p.file.Sync()
case <-p.syncQuit:
p.file.Sync() // Escalate then return..
_ = p.file.Sync() // Escalate then return..
return
}
}
Expand Down Expand Up @@ -358,7 +358,7 @@ func (p *Pager) FileName() string {
return p.file.Name()
}

// EscalateFSync escalates an fsync to disk sending a trigger through channel
// EscalateFSync escalates a disk fsync
func (p *Pager) EscalateFSync() {
p.file.Sync()
_ = p.file.Sync() // Is thread safe
}

0 comments on commit 156b6bf

Please sign in to comment.