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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:52:02+00:00 2026-05-30T23:52:02+00:00

We use .Net 3.5 and C# SmartThreadPool by Ami Bar to manage multiple work

  • 0

We use .Net 3.5 and C# SmartThreadPool by Ami Bar to manage multiple work items. When our app shuts down we would like to “tell” all work items that they should try to complete their work as soon as possible, then give them a grace period to complete and then kill the ones still running. Our work items are cooperative and they need to be able to check if they were “told” to complete work and get out of long-running loops.

It sounded like a good idea to use workItemResult.Cancel(false) to “tell” work items to complete and then use SmartThreadPool.IsWorkItemCanceled inside of work items to stop their work, but it turns out that WaitAll does not wait on cancelled items and hence we can’t block for the grace period.

I started playing with creating a WorkItemGroup for each work item, call Cancel(false) on work item and then workItemGroup.WorkForIdle(gracePeriod) but wanted to check if this is worth pursuing.

I’d appreciate any thoughts on this.

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-30T23:52:03+00:00Added an answer on May 30, 2026 at 11:52 pm

    I ended up patching SmartThreadPool as described here http://smartthreadpool.codeplex.com/discussions/345937

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

Sidebar

Related Questions

My client would like me to use .NET to post to Twitter, and suggests
I would like to use Net::SMTP with dynamic socks proxy. IO::Socket::Socks is aware of
I would like to be able to use .NET 3.5 types in an application
Why would you use .NET Remoting over WCF ? I understand that WCF has
I'd like to use .NET in some PowerShell scripts I'm about to write --
How would one use .net reflection to determine the type of the executing assembly,
I'd like to use .NET 's Lazy<T> class to implement thread safe caching. Suppose
For work, the specification on my project is to use .Net 2.0 so I
I'm trying to use Net::HTTP.get_print in a rails app to get the response from
How can I use .NET DataSet.Select method to search records that match a DateTime?

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.