Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Multi-Thread HttpRequests?
11-12-2009, 04:49 PM #1
- Join Date
- Nov 2009
- Thanked 0 Times in 0 Posts
This is actually VB.NET program I'm running on my server to deal with data collected through an ASP.net web page. I'm just starting working on a program and the amount of pages I'm trying to screen scrape take over 20 minutes, so I was hoping I could run like 4 or 5 threads to cut that down??? I'm pretty much still a novice, so be easy on me. I understand good, though.
12-03-2009, 10:12 PM #2
- Join Date
- May 2007
- Thanked 18 Times in 18 Posts
Here is a brief example with 2 threads:
Imports System.Threading Module Module1 Sub Main() 'Create 2 threads and tell them what to do... Dim t1 As New Thread(AddressOf Process1) Dim t2 As New Thread(AddressOf Process2) 'Start the threads... t1.Start() t2.Start() 'Wait for the threads to finish... t1.Join() t2.Join() 'Both threads have now finished. End Sub Sub Process1() 'Do something here... End Sub Sub Process2() 'Do something else here... End Sub End Module
Last edited by SouthwaterDave; 12-03-2009 at 10:20 PM.