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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:59:47+00:00 2026-06-11T06:59:47+00:00

I am using a task based (TPL) threading model. When starting my application (WPF)

  • 0

I am using a task based (TPL) threading model. When starting my application (WPF) I register TaskScheduler.UnobservedTaskException to display a Message.

However if an exception is raised (e.g.Task.Factory.StartNew(() => throw new Exception());) it takes quite a significant amount of time (3-10 seconds) before the UnobservedTaskException event is raised.

I want it to be raised immediatly (or at least very quick), any idea on what could be the case here?

Regards

  • 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-11T06:59:49+00:00Added an answer on June 11, 2026 at 6:59 am

    This is because the finalizer for that thread has not run yet. Since this occurs with a Garbage Collection, this non-deterministic. Additionally, how does the CLR determine whether to throw it immediately or you wanted to check the task’s result or call Wait() and observe the exception yourself?

    If you enable Break on First Chance Exceptions, it will get thrown while debugging.

    It will be propagated back to the joining thread, guaranteed. If you are using .NET 4.0, your process will terminate. If you are using .NET 4.5, it won’t

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

Sidebar

Related Questions

I am using the wsimport ant task of JAX-WS to generate sources based on
I'm using Grunt (task-based command line build tool for JavaScript projects) in my project.
Is there any ant task based tool using which, we can generate annotation based
HI guys i built a web based task manager / scheduler using vb.net i
I had given the task on Character Based Reporting.. I am using BIRT along
I am using Task.Factory.StartNew to make the long processing service calls off the UI
My main program running 8 tasks using Task.Factory.StartNew Each task will request XML format
I have a task to perform an HttpWebRequest using Task<WebResponse>.Factory.FromAsync(req.BeginGetRespone, req.EndGetResponse) which can obviously
I'm using the Task class from JavaFx's API to perform network operations. The class
I am using asy task for doing loading proccess while the service is supposed

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.