Files
yt-dlp-web-ui/server/internal/worker.go
T
2024-05-20 08:48:01 +02:00

16 lines
275 B
Go

package internal
type Worker struct {
requests chan Process // downloads to do
pending int // downloads pending
index int // index in the heap
}
func (w *Worker) Work(done chan *Worker) {
for {
req := <-w.requests
req.Start()
done <- w
}
}