Documentation
¶
Index ¶
- func RunSync(ctx context.Context, prob *Routine, f func(ctx context.Context)) bool
- func WrapCloser(pb *Routine) closes.WithContextCloser
- type Routine
- func (r *Routine) IsRunning() bool
- func (r *Routine) IsStopped() bool
- func (r *Routine) Running() <-chan struct{}
- func (r *Routine) Start() bool
- func (r *Routine) Stop()
- func (r *Routine) StopAccepted() bool
- func (r *Routine) StopAndWait(ctx context.Context) error
- func (r *Routine) StopAndWaitDuration(duration time.Duration) error
- func (r *Routine) Stopped() chan struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapCloser ¶
func WrapCloser(pb *Routine) closes.WithContextCloser
Types ¶
type Routine ¶
type Routine struct {
// contains filtered or unexported fields
}
a easy manager go routine based on goroutine
func (*Routine) StopAccepted ¶
func (*Routine) StopAndWaitDuration ¶
Click to show internal directories.
Click to hide internal directories.