Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
GeneralRe: resource leak in thread termination? Pin
George_George22-Apr-08 3:03
George_George22-Apr-08 3:03 
GeneralRe: resource leak in thread termination? Pin
Le centriste22-Apr-08 3:07
Le centriste22-Apr-08 3:07 
GeneralRe: resource leak in thread termination? Pin
George_George22-Apr-08 3:38
George_George22-Apr-08 3:38 
GeneralRe: resource leak in thread termination? Pin
Guffa22-Apr-08 3:30
Guffa22-Apr-08 3:30 
GeneralRe: resource leak in thread termination? Pin
George_George22-Apr-08 3:41
George_George22-Apr-08 3:41 
GeneralRe: resource leak in thread termination? Pin
Guffa22-Apr-08 7:25
Guffa22-Apr-08 7:25 
GeneralRe: resource leak in thread termination? Pin
George_George22-Apr-08 16:54
George_George22-Apr-08 16:54 
GeneralRe: resource leak in thread termination? Pin
Guffa27-Apr-08 5:28
Guffa27-Apr-08 5:28 
George_George wrote:
Can we rely on finally block and exception handler for ThreadAbortException?


A using block is the best way to ensure that objects are disposed. A try...finally works just as fine, assuming that you implement it correctly. The ThreadAbortException is sure to occur if the thread is aborted, but as it can happen anywhere in the code, it's a lot trickier to implement correctly.

George_George wrote:
Seems the timeout issue for Finalizer (Finalizer can not execute longer than some amount of time, as your referred article describes) only happens when AppDomain shuts down. If the AppDomain is still running, there should not be timeout issue?


There could be, if one finaliser doesn't return. I'm not sure how the finilising thread handles this, but either it locks up, or it times out that specific finalisation after a while. Even if it has a timeout for every finalisation, it migh be busy for a very long time if there are a lot of instances of the same class, where the finaliser doesn't work.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: resource leak in thread termination? Pin
George_George27-Apr-08 17:44
George_George27-Apr-08 17:44 
GeneralRe: resource leak in thread termination? Pin
Guffa27-Apr-08 23:51
Guffa27-Apr-08 23:51 
GeneralRe: resource leak in thread termination? Pin
George_George28-Apr-08 1:27
George_George28-Apr-08 1:27 
GeneralRe: resource leak in thread termination? Pin
Guffa28-Apr-08 2:00
Guffa28-Apr-08 2:00 
GeneralRe: resource leak in thread termination? Pin
George_George28-Apr-08 2:14
George_George28-Apr-08 2:14 
GeneralRe: resource leak in thread termination? Pin
Guffa28-Apr-08 3:18
Guffa28-Apr-08 3:18 
GeneralRe: resource leak in thread termination? Pin
George_George28-Apr-08 3:56
George_George28-Apr-08 3:56 
GeneralRe: resource leak in thread termination? Pin
Guffa28-Apr-08 14:31
Guffa28-Apr-08 14:31 
GeneralRe: resource leak in thread termination? Pin
George_George29-Apr-08 2:41
George_George29-Apr-08 2:41 
GeneralRe: resource leak in thread termination? Pin
Guffa29-Apr-08 8:37
Guffa29-Apr-08 8:37 
GeneralRe: resource leak in thread termination? Pin
George_George29-Apr-08 21:50
George_George29-Apr-08 21:50 
Generalstop a thread Pin
George_George21-Apr-08 23:49
George_George21-Apr-08 23:49 
GeneralRe: stop a thread Pin
Mircea Puiu22-Apr-08 1:12
Mircea Puiu22-Apr-08 1:12 
GeneralRe: stop a thread Pin
George_George22-Apr-08 1:14
George_George22-Apr-08 1:14 
GeneralRe: stop a thread Pin
Mircea Puiu22-Apr-08 1:42
Mircea Puiu22-Apr-08 1:42 
GeneralRe: stop a thread Pin
George_George22-Apr-08 2:53
George_George22-Apr-08 2:53 
GeneralRe: stop a thread Pin
Mircea Puiu22-Apr-08 5:04
Mircea Puiu22-Apr-08 5:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.