Skip to content

How can Release thread speed?

XIII XIII

Asked Aug 10, 2014, 12:56 PM EDT7 answers
Share
LinkedInX
I use this code
bud it slow and use more cpu
 so
 i want  faster way 
but how i can do it?
 
my code
 
public void Start()
{ 
 
Code
            for (int i = 1; i < 150; i++)
            {
                Thread reqThread = new Thread(new ParameterizedThreadStart(Test));


             reqThread.Start(i);

            }
 
Code
}


Public void Test ( object i)
{

Try{
    SetProxy
            Connect 
                         Send
Code
                               Response
   }

  catch
 {
    Test(i)
}

}

7 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • +1
    got it so from code you want to verify million of user's username & password and you want to complete this activity faster. Is this correct?

    I would suggest you can look at Task library of .Net framework which does thread management internally. 
    +1
  • 0
    hey,

    you're creating 150 new threads? isn't it much to manage? i believe it'll be slow as you've .net framework threads + 150 threads that you've created?

    may i know reason to spawn 150?

    thnx
    0
  • 0
    i want create a cracker
     this theard   it  isn't much to manage in vb6 :D
    0
  • 0
    what is cracker?

    and i didn't understand
    "this theard   it  isn't much to manage in vb6 "
    0
  • 0
    so that's fairly simple requirement, but why 150 threads are needed for this?
    0
  • 0
    for test i just import 3 user name
    but in fact i load several milions username for  check
    because of this i must use 150 or more threads
    0