mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-12 16:55:48 -04:00
remove unused code
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package signal
|
||||
|
||||
import "io"
|
||||
|
||||
// Notifier is a utility for notifying changes. The change producer may notify changes multiple time, and the consumer may get notified asynchronously.
|
||||
type Notifier struct {
|
||||
c chan struct{}
|
||||
@@ -26,18 +24,3 @@ func (n *Notifier) Signal() {
|
||||
func (n *Notifier) Wait() <-chan struct{} {
|
||||
return n.c
|
||||
}
|
||||
|
||||
type nCloser struct {
|
||||
n *Notifier
|
||||
}
|
||||
|
||||
func (c *nCloser) Close() error {
|
||||
c.n.Signal()
|
||||
return nil
|
||||
}
|
||||
|
||||
func NotifyClose(n *Notifier) io.Closer {
|
||||
return &nCloser{
|
||||
n: n,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user