I currently have a web scraper which runs well but slowly as it only does one url at a time.
I am trying to get threading to work and use a couple of threads each one with a different url
So basically I set the and array of url, and ask get1page function to fill a class with data.
The code kind of works how ever does not always get the data or is incomplete.
Am I going down the correct rout here or am I totally the wrong way? would anyone mind sharing some code?
I am trying to get threading to work and use a couple of threads each one with a different url
PHP:
ThreadPool.SetMaxThreads(5, 1)
For i = tonumber To fromnumber
ThreadPool.QueueUserWorkItem(Function(o) get1page(url(number))
number += 1
Next
The code kind of works how ever does not always get the data or is incomplete.
Am I going down the correct rout here or am I totally the wrong way? would anyone mind sharing some code?
Last edited: