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 127073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:25:07+00:00 2026-05-11T05:25:07+00:00

I need to call a couple of methods asynchronously with different priorities. My first

  • 0

I need to call a couple of methods asynchronously with different priorities.

My first idea was to use the ThreadPool and change the priority of the Thread like this:

static void Run() {   ThreadPool.QueueUserWorkItem(new WaitCallback(SomeMethod)); }  static void SomeMethod(object o) {   Thread.CurrentThread.Priority = ThreadPriority.BelowNormal; // is this ok?   // do some work here } 

Does that work or what do you recommend?

  • 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. 2026-05-11T05:25:08+00:00Added an answer on May 11, 2026 at 5:25 am

    According to http://msdn.microsoft.com/en-us/library/0ka9477y.aspx, it won’t work if you are targeting 2.0, it alludes to there being some differences in 3.5 but doesn’t specifically mention priority:

    When Not to Use Thread Pool Threads

    There are several scenarios in which it is appropriate to create and manage your own threads instead of using thread pool threads:

    • You require a foreground thread.

    • You require a thread to have a particular priority.

    • You have tasks that cause the thread to block for long periods of time. The thread pool has a maximum number of threads, so a large number of blocked thread pool threads might prevent tasks from starting.

    • You need to place threads into a single-threaded apartment. All ThreadPool threads are in the multithreaded apartment.

    • You need to have a stable identity associated with the thread, or to dedicate a thread to a task.

    You’ll likely need to come up with your own implementation, and handle creation of Threads directly.

    Question: What are you trying to achieve do you have a set of tasks to be processed and you want high priority tasks to happen first, and lower ones to happen later; or do you actually want Threads of differing priority?

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

Sidebar

Related Questions

I have a couple of methods that do processing after fetching data.I need call
I need to call some jQuery .load() function from flash. i Use this: import
I need to call a number of different procedures within an Oracle package successively
I need to call some methods in Wininet.dll from a Java program. I can
I have a couple of questions about the way I call methods in EL.
I need to be able to use this call: h = x.inject({}) {|a, b|
I writing a PHP script program under Linux. In the script, I need call
Need to call a filter function on some options based on a radio selected
I need to call Ghostscript in one of our cgi to convert a PDF
I need to call a method and pass an object from my custom UITableViewClass

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.