-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Expected Behavior
There shouldn't be running goroutines at exit.
Current Behavior
func (p *amplitudePlugin) Setup(config types.Config) {} does
go p.start(p.messageChannel)
The goroutine is still running on exit.
Possible Solution
- Provide a way to terminate the goroutine
- Return p.messageChannel so that it could be sent a message to terminate.
Steps to Reproduce
In any go program using analytics-go add
defer func() {
p := pprof.Lookup("goroutine")
p.WriteTo(os.Stdout, 2)
numGoroutines := runtime.NumGoroutine()
printf("goroutines at exit of main()=%d", numGoroutines)
}()
You'll see the running goroutine started by start()
Environment
- SDK Version: v1.0.1
- Go Version: go1.22.1
- OS Info: macOS 14
victorpierredev and icamys
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working