24 downloads at once

This commit is contained in:
ferrreo 2023-09-05 19:02:49 +01:00
parent c7913969ee
commit a2ce61c4c5
2 changed files with 2 additions and 2 deletions

BIN
ppp

Binary file not shown.

View File

@ -233,11 +233,11 @@ func sign(ch chan bool, path string) {
func download(packages map[string]packageInfo, url string, output string) {
// Create a buffered channel to store the packages to be downloaded
packageQueue := make(chan packageInfo, 10)
packageQueue := make(chan packageInfo, 24)
// Create a worker pool with 10 workers
var wg sync.WaitGroup
for i := 0; i < 10; i++ {
for i := 0; i < 24; i++ {
wg.Add(1)
go func() {
defer wg.Done()