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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:17:17+00:00 2026-06-11T16:17:17+00:00

I have Googled but still confused with Task, Thread, and Background Worker….. Is Task

  • 0

I have “Googled” but still confused with Task, Thread, and Background Worker…..

  1. Is “Task is a high level API that running on current thread” correct ?

  2. If 1 is correct, why I need to use invoke to change the UI inside the task at same thread ?

  3. Backgroundworker only got lowest priority in the application ? So the performance of backgroundworker is lower than task and thread ? Right ?

  4. Finally, in my application I need to get a string from server using “HttpWebRequest”, after that parse the string and update the UI.
    If I use “HttpWebRequest.BeginGetResponse” to wait for the async result and trigger an complete event to update the UI, I need to use invoke method to call the UI thread control, but can I use background worker instead of ? I can just simply change the UI in “RunWorkerCompleted” event, are there any disadvantage ?

Sorry for my pool English and thanks for help…!

  • 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-11T16:17:19+00:00Added an answer on June 11, 2026 at 4:17 pm

    1) No, a Task is by default run on a thread pool thread. You can provide another scheduler which can run tasks differently, though.

    3) There is no difference in priority by default. BackgroundWorker also runs on a thread pool thread.

    4) Using TaskFactory.FromAsync is a rather simple way to handle asynchronous web requests:

    Task.Factory.FromAsync<WebResponse>(request.BeginGetResponse, request.EndGetResponse, null)
        .ContinueWith(
            t =>
            {
                using (var response = (HttpWebResponse)t.Result)
                {
                    // Do your work
                }
            },
            TaskScheduler.FromCurrentSynchronizationContext()
        );
    

    Using TaskScheduler.FromCurrentSynchronizationContext ensures that the callback in ContinueWith is invoked on the current thread. So, if the task is created on the UI thread, the response will be retrieved in the background and then processed on the UI thread.

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

Sidebar

Related Questions

I read many threads in stackoverflow and also googled but i still have one
I've have gone through stackoverflow for days and googled a lot but can still
Ok I am still learning this... I have Googled and done some research but
I have been browsing through Google for various explanations but I STILL couldn't figure
Is it possible to disable the volume in sound settings? I have googled but
I'm new to Django and Web programming in general. Have googled but could not
I have Googled merge+cell+Javascript but did not find any suitable code to implement merge
I am new to Emacs. I have googled this but no good answer there.
I have searched/Googled around but I'm struggling with the following problem. I am building
I have googled the topic for a while but haven't found what I'm looking

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.