Documentation ¶
Index ¶
- type ThreadFunc
- type ThreadFuncCancel
- type ThreadGroup
- func (group *ThreadGroup) Cancel()
- func (group *ThreadGroup) CancelAndWait()
- func (group *ThreadGroup) Context() context.Context
- func (group *ThreadGroup) Done() <-chan struct{}
- func (group *ThreadGroup) Spawn(f ThreadFunc)
- func (group *ThreadGroup) SpawnN(f ThreadFunc, i int)
- func (group *ThreadGroup) SpawnWithCancel(f ThreadFuncCancel)
- func (group *ThreadGroup) SubGroup() *ThreadGroup
- func (group *ThreadGroup) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThreadFunc ¶
type ThreadFunc func()
type ThreadFuncCancel ¶
type ThreadFuncCancel func(quit context.Context, cancel context.CancelFunc)
type ThreadGroup ¶
type ThreadGroup struct {
// contains filtered or unexported fields
}
func NewThreadGroup ¶
func NewThreadGroup(parent context.Context) *ThreadGroup
func (*ThreadGroup) Cancel ¶
func (group *ThreadGroup) Cancel()
func (*ThreadGroup) CancelAndWait ¶
func (group *ThreadGroup) CancelAndWait()
func (*ThreadGroup) Context ¶
func (group *ThreadGroup) Context() context.Context
func (*ThreadGroup) Done ¶
func (group *ThreadGroup) Done() <-chan struct{}
func (*ThreadGroup) Spawn ¶
func (group *ThreadGroup) Spawn(f ThreadFunc)
func (*ThreadGroup) SpawnN ¶
func (group *ThreadGroup) SpawnN(f ThreadFunc, i int)
func (*ThreadGroup) SpawnWithCancel ¶
func (group *ThreadGroup) SpawnWithCancel(f ThreadFuncCancel)
func (*ThreadGroup) SubGroup ¶
func (group *ThreadGroup) SubGroup() *ThreadGroup
create a new group that can have its own set of threads. * the current group will wait for all subgroups to exit
func (*ThreadGroup) Wait ¶
func (group *ThreadGroup) Wait()
Click to show internal directories.
Click to hide internal directories.