diff options
| author | demo <demo@antix1> | 2026-05-26 22:04:48 -0400 |
|---|---|---|
| committer | demo <demo@antix1> | 2026-05-26 22:05:21 -0400 |
| commit | 5898a16cf4b9dc2f0eef2bf81d429b5aca7005fc (patch) | |
| tree | 761688648e0bbfe3eeef64b79da78b2baef0010f /workers.go | |
| parent | dec73ce1d6d0abf31861cae9dd7965d86dc7496f (diff) | |
feat: add some prints to prove we need to select on Done()
Diffstat (limited to 'workers.go')
| -rw-r--r-- | workers.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -31,12 +31,12 @@ func workers(startURL url.URL, maxConcurrency, maxURLs int) { // the urls channel (unseen links.) for i := range maxConcurrency { wg.Go(func() { - loop: for u := range urls { batch := getBatch(u) select { case <-ctx.Done(): - break loop + fmt.Printf("exiting early %d\n", i+1) + return default: go func() { worklist <- batch }() } |
