Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
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 
Thanks Mircea,


Two more questions,

1. When using Interrupt method, we need to consider whether thread is in wait status. I am wondering if,

- the thread is executing and waiting on lock (someobject), e.g. blocked on lock statement or Monitor statement;

- or trying to acquire (but not acquired yet) a readwrite lock;

Will the thread be interrupted in the above two situations when we call Interrupt?

2.

Is it ensured the Finally block for ThreadInterruptedException (for Thread.Interrupt called), and Finally block for ThreadAbortException (for Thread.Abort called) be ensured to be executed? If yes, I can rely on resource relase method there to ensure no resource leak. Smile | :)


regards,
George
GeneralRe: stop a thread Pin
Mircea Puiu22-Apr-08 5:04
Mircea Puiu22-Apr-08 5:04 
GeneralRe: stop a thread Pin
George_George22-Apr-08 16:25
George_George22-Apr-08 16:25 
GeneralRe: stop a thread Pin
Mircea Puiu23-Apr-08 20:52
Mircea Puiu23-Apr-08 20:52 
GeneralRe: stop a thread Pin
George_George23-Apr-08 21:00
George_George23-Apr-08 21:00 
GeneralRe: stop a thread Pin
Mircea Puiu24-Apr-08 20:43
Mircea Puiu24-Apr-08 20:43 
GeneralRe: stop a thread Pin
George_George24-Apr-08 21:34
George_George24-Apr-08 21:34 
GeneralRe: stop a thread Pin
Ravi Bhavnani22-Apr-08 2:16
professionalRavi Bhavnani22-Apr-08 2:16 
GeneralRe: stop a thread Pin
George_George22-Apr-08 3:01
George_George22-Apr-08 3:01 
GeneralRe: stop a thread Pin
Ravi Bhavnani22-Apr-08 4:57
professionalRavi Bhavnani22-Apr-08 4:57 
GeneralRe: stop a thread Pin
George_George22-Apr-08 16:23
George_George22-Apr-08 16:23 
QuestionC# Drawing question Pin
oliversimon21-Apr-08 23:12
oliversimon21-Apr-08 23:12 
GeneralRe: C# Drawing question Pin
Reelix22-Apr-08 0:09
Reelix22-Apr-08 0:09 
GeneralRe: C# Drawing question Pin
oliversimon22-Apr-08 0:34
oliversimon22-Apr-08 0:34 
GeneralRe: C# Drawing question Pin
Anthony Mushrow22-Apr-08 1:35
professionalAnthony Mushrow22-Apr-08 1:35 
GeneralRe: C# Drawing question Pin
Reelix22-Apr-08 1:55
Reelix22-Apr-08 1:55 
GeneralRe: C# Drawing question Pin
Anthony Mushrow22-Apr-08 2:00
professionalAnthony Mushrow22-Apr-08 2:00 
GeneralRe: C# Drawing question Pin
oliversimon22-Apr-08 2:45
oliversimon22-Apr-08 2:45 

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.