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

  • Home
  • SEARCH
  • 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 3976830
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:51:05+00:00 2026-05-20T04:51:05+00:00

I have some question about using queues and threads. I already made researches, but

  • 0

I have some question about using queues and threads. I already made researches, but I don’t manage to understand the general functionnement.

What I want to do : I have a class, named “mTask”, in which there are properties and a method, called “StartmTask”. When I create a new mTask, I add it to a List .

And I want to process the mTask, when there are mTasks in the list. ( I have to launch a task on each free processor of the computer)

I don’t understand how I should do… I think this is “simple” but I am actually lost.
Is any one would be able to explain it as simply as possible ?

Thanks a lot, I keep searching, if I am not clear enough, or if you need more information, don’t hesitate to ask.

Yowan

  • 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-05-20T04:51:06+00:00Added an answer on May 20, 2026 at 4:51 am

    I think probably the best and simplest solution would be to put the mTask to the ThreadPool instead of an list which you would have to observe.

    Have a look at the method

    ThreadPool.QueueUserWorkItem

    Example:

    ThreadPool.QueueUserWorkItem(new WaitCallback(DoWork), )mTask);
    
    private void DoWork(object o)
    {
        task = o;
    }
    

    If you use it, without any settings, the Threads are assigned to every cpu. You don’t have to care about that.

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

Sidebar

Related Questions

I have some question about the privacy issues using Google Analytics. I've heard that
I am using the RLastFM package, and have some question about the function: >
I have a question about Tcl, we are using Tcl to write some test
This is a question I have wondered about for quite some time, yet I
I have some questions about basic CSS that I was unable to understand or
I have some question about DataGridView . I can show table in DataGridView ,
We are using TFS 2010 with gated checkins. I've got some question about what
I have a question about testing the queries in a transaction. I've been using
I have now some question about hiding some characters ... I want to hide
I have a question about using PHPUnit to mock a private method inside a

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.