func (tg *ThreadGroup) release() {
	// Timers must be destroyed without holding the TaskSet or signal mutexes
	// since timers send signals with Timer.mu locked.
	tg.itimerRealTimer.Destroy()
	var its []*IntervalTimer
	tg.pidns.owner.mu.Lock()
	tg.signalHandlers.mu.Lock()
	for _, it := range tg.timers {
		its = append(its, it)
	}
	tg.timers = make(map[linux.TimerID]*IntervalTimer) // nil maps can't be saved
	tg.signalHandlers.mu.Unlock()
	tg.pidns.owner.mu.Unlock()
	for _, it := range its {
		it.DestroyTimer()
	}
	if tg.mounts != nil {
		tg.mounts.DecRef()
	}
}
// release releases the thread group's resources.
release releases the thread group's resources.
// release releases the thread group ' s resources .
func (tg *ThreadGroup) release() {
	tg.itimerRealTimer.Destroy()
	var its []*IntervalTimer
	tg.pidns.owner.mu.Lock()
	tg.signalHandlers.mu.Lock()
	for _, it := range tg.timers {
		its = append(its, it)
	}
	tg.timers = make(map[linux.TimerID]*IntervalTimer) 
	tg.signalHandlers.mu.Unlock()
	tg.pidns.owner.mu.Unlock()
	for _, it := range its {
		it.DestroyTimer()
	}
	if tg.mounts != nil {
		tg.mounts.DecRef()
	}
}
func ( tg * ThreadGroup ) release ( ) { tg . itimerRealTimer . Destroy ( ) var its [ ] * IntervalTimer tg . pidns . owner . mu . Lock ( ) tg . signalHandlers . mu . Lock ( ) for _ , it := range tg . timers { its = append ( its , it ) } tg . timers = make ( map [ linux . TimerID ] * IntervalTimer ) tg . signalHandlers . mu . Unlock ( ) tg . pidns . owner . mu . Unlock ( ) for _ , it := range its { it . DestroyTimer ( ) } if tg . mounts != nil { tg . mounts . DecRef ( ) } }
release releases the thread group's resources.
release releases the thread group ' s resources .
// Timers must be destroyed without holding the TaskSet or signal mutexes // since timers send signals with Timer.mu locked. // nil maps can't be saved