strvcom/strv-backend-go-background

feat: option to report or kill stalled goroutines

robertrossmann opened this issue · 1 comments

Currently when a goroutine runs indefinitely this package does not really care. Perhaps it would be good to add a configuration option, MaxDuration, which when set, would trigger a hook (.OnMaxDurationExceeded(ctx context.Context, meta Meta)).

Optionally, we could try to come up with some mechanism to allow the hook to also kill the goroutine.

Implemented in #2 . No goroutine killing after exceeding the threshold for now, just reporting.