import "github.com/v2ray/v2ray-core/common/signal"
func CancelAfterInactivity(ctx context.Context, cancel context.CancelFunc, timeout time.Duration) *ActivityTimer
func (t *ActivityTimer) SetTimeout(timeout time.Duration)
func (t *ActivityTimer) Update()
type ActivityUpdater interface {
Update()
}
type Notifier struct {
// contains filtered or unexported fields
}
Notifier is a utility for notifying changes. The change producer may notify changes multiple time, and the consumer may get notified asynchronously.
NewNotifier creates a new Notifier.
Signal signals a change, usually by producer. This method never blocks.
Wait returns a channel for waiting for changes. The returned channel never gets closed.
Path | Synopsis |
---|---|
done | |
pubsub | |
semaphore |
Package signal imports 5 packages (graph) and is imported by 3 packages. Updated 2020-11-05. Refresh now. Tools for package owners.