mediamtx/internal/externalcmd/pool.go
2021-12-21 12:43:45 +01:00

21 lines
283 B
Go

package externalcmd
import (
"sync"
)
// Pool is a pool of external commands.
type Pool struct {
wg sync.WaitGroup
}
// NewPool allocates a Pool.
func NewPool() *Pool {
return &Pool{}
}
// Close waits for all external commands to exit.
func (p *Pool) Close() {
p.wg.Wait()
}