diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-01 23:33:46 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-01 23:33:46 +0200 |
| commit | 3690b89082215ff5c1fc84110074cf08b1b8909c (patch) | |
| tree | e89f32688b64a467cb804e9df615a32cc6c2522c /internal/flamegraph | |
| parent | 3a438f0381a21c0055db3cce3164ff0ef5970cc0 (diff) | |
Route non-fatal event-loop warnings to TUI
Diffstat (limited to 'internal/flamegraph')
| -rw-r--r-- | internal/flamegraph/iordatacollector.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/flamegraph/iordatacollector.go b/internal/flamegraph/iordatacollector.go index a63b742..948af97 100644 --- a/internal/flamegraph/iordatacollector.go +++ b/internal/flamegraph/iordatacollector.go @@ -5,7 +5,6 @@ import ( "fmt" "ior/internal/event" "ior/internal/flags" - "os" "runtime" "sync" ) @@ -13,14 +12,14 @@ import ( type IorDataCollector struct { flags flags.Flags Ch chan *event.Pair - Done chan struct{} + Done chan error workers []worker } func New() IorDataCollector { f := IorDataCollector{ Ch: make(chan *event.Pair, 4096), - Done: make(chan struct{}), + Done: make(chan error, 1), } numWorkers := runtime.NumCPU() / 4 if numWorkers == 0 { @@ -52,8 +51,9 @@ func (f IorDataCollector) Start(ctx context.Context) { } } if err := iod.serializeToFile(); err != nil { - fmt.Println(err) - os.Exit(2) + f.Done <- err + return } + f.Done <- nil }() } |
