diff options
Diffstat (limited to 'internal/flamegraph/worker.go')
| -rw-r--r-- | internal/flamegraph/worker.go | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/internal/flamegraph/worker.go b/internal/flamegraph/worker.go deleted file mode 100644 index 0f49568..0000000 --- a/internal/flamegraph/worker.go +++ /dev/null @@ -1,33 +0,0 @@ -package flamegraph - -import ( - "context" - "ior/internal/event" - "sync" -) - -type worker struct { - iod iorData - done chan struct{} -} - -func newWorker() worker { - return worker{iod: newIorData()} -} - -func (w worker) run(ctx context.Context, wg *sync.WaitGroup, ch <-chan *event.Pair) { - defer wg.Done() - - for { - select { - case ev, ok := <-ch: - if !ok { - return - } - w.iod.addEventPair(ev) - ev.Recycle() - case <-ctx.Done(): - return - } - } -} |
