farkaskid/WebCrawler

Implement a task queue with fixed number of workers.

Closed this issue · 2 comments

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.

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