Implement a task queue with fixed number of workers.
Closed this issue · 2 comments
farkaskid commented
Currently, an new goroutine is launched for every collected/filtered URL. The number of goroutines are hence uncontrolled. Implement a task queue with fixed number of workers that can be specified by the user through commandline.
mahesh1996 commented
farkaskid commented
Looks useful. I'll try it in a separate branch.
Also, I have implemented a solution in the executor package. It's simple and highly decoupled from the crawler logic.
Take a look https://github.com/farkaskid/WebCrawler/tree/add-task-queue?files=1