Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8941795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:23:04+00:00 2026-06-15T11:23:04+00:00

I am using the fantastic SmartThreadPool to queue up a bunch of parsing tasks.

  • 0

I am using the fantastic SmartThreadPool to queue up a bunch of parsing tasks.

So basically what happens is that when the users clicks the button Start, the program will loop through different lists and based on those lists it will start different jobs (note: this can be 500.000 jobs).

I am queueing up like this:

 private void button1_Click(object sender, EventArgs e)
 {
     button1.Enabled = false;
     button2.Enabled = true;

     stpStartInfo.MaxWorkerThreads = Convert.ToInt32(parserThreadCount.Value);
     stpStartInfo.MinWorkerThreads = 1;
     _smartThreadPool2 = new Smart.SmartThreadPool(stpStartInfo);

     ........

     foreach (string engine in _checkedEngines)
     {
         query = lines[i];

         _smartThreadPool2.QueueWorkItem(
         new Amib.Threading.Func<string, string, int, int, int>(scrapeFunction),
         query, engine, iia, useProxies);

         iia++;
     }
}

So the problem is that the user has to wait (interface almost hangs) when queueing up like 200.000+ threads..

The ideal solution would be for a way to let the threads that have already queued up start, and then queue the rest in the background.. But have no idea how i could accomplish this..

Any ideas? 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:23:05+00:00Added an answer on June 15, 2026 at 11:23 am

    You can use one of the threads to queue the jobs. Just move the foreach to a separate method and queue it in your main thread. That will be enough to do the queuing in parallel and when it’s done, its thread will be recycled as well by the SmartThreadPool and used for the queued jobs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using twitter's bootstrap CSS framework (which is fantastic). For some messages to users
im using the fantastic eric4 ide to code python, it's got a tool built
Background: I'm using the (fantastic) Vim plugin python-mode , which includes the pep8 linter.
I'm using the fantastic jquery .validate plugin from Jörn Zaefferer at bassistance I'm using
How would I go about using Stephen Celis' fantastic SCListener singleton? ( http://stephencelis.com/2009/03/02/now-i-just-need-an-audience.html )
I'm using Alex Michael's fantastic javascript filtrr library to allow me to manipulate images
@swatkins gave a fantastic answer to his own question about using jQuery templates with
I am experiencing a fatal error while using artisan on the (fantastic) Laravel PHP
I'm using the fantastic project Script# ( http://projects.nikhilk.net/ScriptSharp ) I can't seem to get
I am using this fantastic example of a jQuery editable invoice as a template

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.