mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-19 05:24:48 -04:00
refactor(tracker): new closing mechanism logic
This commit is contained in:
parent
9f89c37956
commit
554a840982
@ -8,6 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"runtime/pprof"
|
||||
"time"
|
||||
|
||||
"gioui.org/app"
|
||||
"github.com/vsariola/sointu"
|
||||
@ -71,7 +72,8 @@ func main() {
|
||||
go func() {
|
||||
trackerUi.Main()
|
||||
audioCloser.Close()
|
||||
detector.Close()
|
||||
tracker.TrySend(broker.CloseDetector, struct{}{})
|
||||
tracker.TimeoutReceive(broker.FinishedDetector, 3*time.Second)
|
||||
if *cpuprofile != "" {
|
||||
pprof.StopCPUProfile()
|
||||
f.Close()
|
||||
|
Reference in New Issue
Block a user