Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 11th, 2003, 12:55 PM
Registered User
Join Date: Oct 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Advanced .NET: Background thread termination

I don't see a forum for .NET framework or the Advanced .NET book, so I hope this is a decent place to post.

I've read a numnber of places that using a delegate's .BeginInvoke method is a great way to spawn a background thread from the thread pool if you don't need much control over it. Agreed. However, I don't see how any task could be sent off on a background thread without concern for the application being shut down by the user during its execution. However, I don't see any exceptions thrown on the background or foreground threads when this occurs so it seems I have no way of finding out that the app is shutting down and taking measures on the background thread to at least make sure I don't get killed with a file still open or something.

Am I missing something here or is .BeginInvoke useless without protecting the app from shutdown until .EndInvoke is called? I can certainly do that with a flag on the main thread but I sort of expected that at least the finally blocks would execute on the background thread -- they don't.


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 3.5 Advanced CSS Question aspcoder BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 April 28th, 2008 03:58 AM
Getting AD Object Advanced ACLs in VB.NET taleb .NET Framework 2.0 0 November 13th, 2007 07:15 AM
How to Pause or sleep the background worker thread mks033 C# 2005 0 May 3rd, 2006 07:03 AM
Advanced Combo Box in .NET mcinar General .NET 2 February 12th, 2005 08:58 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.