Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Splitting up a list of things.

Splitting up a list of things.

Scheduled Pinned Locked Moved C#
tutoriallounge
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Buckleyindahouse
    wrote on last edited by
    #1

    For example, lets say I have 500 proxies and I wanted to check them all. How could I split those up into a random amount of threads(User inputted) and check them all at once using multiple threads. Thanks, BuckleyInDaHouse.

    G 1 Reply Last reply
    0
    • B Buckleyindahouse

      For example, lets say I have 500 proxies and I wanted to check them all. How could I split those up into a random amount of threads(User inputted) and check them all at once using multiple threads. Thanks, BuckleyInDaHouse.

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      You probably can't check them all at once, because you might overload the computer and/or the network. Start a couple of worker threads, and let them check the proxies one at a time. If you search for SynchronisedQueue, you will find a class that I wrote a while back. You can use it to let the threads get one task at a time from a common queue, and to let all the threads return the results to the main thread.

      Despite everything, the person most likely to be fooling you next is yourself.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups