Files
ITWorx Pulse release export bd774932d5
Public source validation / validate (push) Failing after 3m8s
Publish ITWorx Pulse source
2026-09-03 02:09:19 +02:00

16 lines
335 B
Go

package service
import (
"context"
"os"
)
// WaitForStop blocks until the context is cancelled or a signal is received.
// It accepts a channel so shutdown behavior can be tested without sending a real OS signal.
func WaitForStop(ctx context.Context, signals <-chan os.Signal) {
select {
case <-ctx.Done():
case <-signals:
}
}