Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WaitObject ¶
type WaitObject struct {
// contains filtered or unexported fields
}
type WaitObjectGroup ¶
type WaitObjectGroup struct {
// contains filtered or unexported fields
}
idをkeyとしてchを保持, userには渡さない
func CreateGroup ¶
func CreateGroup(ctx context.Context) (*WaitObjectGroup, context.Context)
func (*WaitObjectGroup) Go ¶
func (wog *WaitObjectGroup) Go(f func()) WaitObjectID
goroutineの実行と、chリスト(≒groutineリスト)への登録 closeしたらidをdelete ユーザのch操作は許容しないためidのみ返す
func (*WaitObjectGroup) Wait ¶
func (wog *WaitObjectGroup) Wait(idList ...WaitObjectID)
引数で受け取ったchに対応するgroutineが全て終わるまで待機
Click to show internal directories.
Click to hide internal directories.