Merge pull request #2763 from gaurav1086:sentry_kernel_timekeeper_use_buffered_channel
PiperOrigin-RevId: 315803553
This commit is contained in:
commit
508e7c3a79
|
@ -186,6 +186,7 @@ func (t *Timekeeper) startUpdater() {
|
||||||
timer := time.NewTicker(sentrytime.ApproxUpdateInterval)
|
timer := time.NewTicker(sentrytime.ApproxUpdateInterval)
|
||||||
t.wg.Add(1)
|
t.wg.Add(1)
|
||||||
go func() { // S/R-SAFE: stopped during save.
|
go func() { // S/R-SAFE: stopped during save.
|
||||||
|
defer t.wg.Done()
|
||||||
for {
|
for {
|
||||||
// Start with an update immediately, so the clocks are
|
// Start with an update immediately, so the clocks are
|
||||||
// ready ASAP.
|
// ready ASAP.
|
||||||
|
@ -220,7 +221,6 @@ func (t *Timekeeper) startUpdater() {
|
||||||
select {
|
select {
|
||||||
case <-timer.C:
|
case <-timer.C:
|
||||||
case <-t.stop:
|
case <-t.stop:
|
||||||
t.wg.Done()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue