v2ray-core: github.com/v2ray/v2ray-core/common/signal/done Index | Files

package done

import "github.com/v2ray/v2ray-core/common/signal/done"


Package Files


type Instance Uses

type Instance struct {
    // contains filtered or unexported fields

Instance is a utility for notifications of something being done.

func New Uses

func New() *Instance

New returns a new Done.

func (*Instance) Close Uses

func (d *Instance) Close() error

Close marks this Done 'done'. This method may be called multiple times. All calls after first call will have no effect on its status.

func (*Instance) Done Uses

func (d *Instance) Done() bool

Done returns true if Close() is called.

func (*Instance) Wait Uses

func (d *Instance) Wait() <-chan struct{}

Wait returns a channel for waiting for done.

Package done imports 1 packages (graph). Updated 2020-12-22. Refresh now. Tools for package owners.