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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:16:31+00:00 2026-05-25T11:16:31+00:00

So the problem is I have a ThreadManager class which use queue to hold

  • 0

So the problem is I have a ThreadManager class which use queue to hold the Task objects; the ThreadManager can start the Task by invoking the Task‘s Start() method from which will generate a thread to run some algorithm (the actual “task”). Now what I want to achieve is to let the ThreadManager to monitor the status of the task thread (generated from the Start() method of the Task object).

For this to work, I think I need to create a thread to do the monitoring in the ThreadManager, and I need a way to let the task thread to fire events to notify the monitor thread that I am finished or I encountered some error, so the monitor can handle these event accordingly.

Gurus, please advise me if my idea is applicable? And if it is, how to achieve this workflow? Many thanks!

  • 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-25T11:16:31+00:00Added an answer on May 25, 2026 at 11:16 am

    I would just use Task.ContinueWith to schedule a continuation for each of the tasks and then change the status depending on the result of the task in your continuation. You know that the task has been started (because you called Start()) – you just need to know when the task completes. If it fails, is cancelled, or finishes, you can observe that in the continuation task and then you can update your status. The continuation task is an Action<Task>, which receives the completed task. You can call task.Status to get the status of that completed task.

    Then you don’t need to have a separate thread/task to monitor the status periodically.

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

Sidebar

Related Questions

Problem: I have a document class which contains a list of objects. These objects
What properties should the problem have so that I can decide which method to
Problem: I have an address field from an Access database which has been converted
PROBLEM: I have a Child class which uses DataContractSerialization and raises a Changed event
Problem: I have a WCF Webservice which can be used by customers to upload
Problem: I have a project which I'm porting from Solaris/Lex/Yacc to Linux/Flex/Bison + Autotools.
Problem I have timestamped data, which I need to search based on the timestamp
Problem: We have a web app that calls some web services asynchronously (from the
Problem: We have to read from a proprietary binary file at work. It changes
Problem I have a protobuf message definition with a MessageType field, which is an

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.