Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-12-2009, 03:49 PM   PM User | #1
Jancarius
New to the CF scene

 
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Jancarius is an unknown quantity at this point
Multi-Thread HttpRequests?

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.
Jancarius is offline   Reply With Quote
Old 12-03-2009, 09:12 PM   PM User | #2
SouthwaterDave
Regular Coder

 
Join Date: May 2007
Location: UK
Posts: 180
Thanks: 0
Thanked 18 Times in 18 Posts
SouthwaterDave is on a distinguished road
Here is a brief example with 2 threads:
Code:
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 09:20 PM..
SouthwaterDave is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:20 PM.


Advertisement
Log in to turn off these ads.