func (tg *ThreadGroup) forEachChildThreadGroupLocked(fn func(*ThreadGroup)) {
	for t := tg.tasks.Front(); t != nil; t = t.Next() {
		for child := range t.children {
			if child == child.tg.leader {
				fn(child.tg)
			}
		}
	}
}
// forEachChildThreadGroupLocked indicates over all child ThreadGroups.
//
// Precondition: TaskSet.mu must be held.
forEachChildThreadGroupLocked indicates over all child ThreadGroups.

TaskSet.mu must be held.
// forEachChildThreadGroupLocked indicates over all child ThreadGroups . // // Precondition : TaskSet . mu must be held .
func (tg *ThreadGroup) forEachChildThreadGroupLocked(fn func(*ThreadGroup)) {
	for t := tg.tasks.Front(); t != nil; t = t.Next() {
		for child := range t.children {
			if child == child.tg.leader {
				fn(child.tg)
			}
		}
	}
}
func ( tg * ThreadGroup ) forEachChildThreadGroupLocked ( fn func ( * ThreadGroup ) ) { for t := tg . tasks . Front ( ) ; t != nil ; t = t . Next ( ) { for child := range t . children { if child == child . tg . leader { fn ( child . tg ) } } } }
forEachChildThreadGroupLocked indicates over all child ThreadGroups.
forEachChildThreadGroupLocked indicates over all child ThreadGroups .