Click here to Skip to main content
15,925,181 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Thread Sincronization Issue: Aborting thread with locked resources PinPopular
Luc Pattyn6-Aug-09 8:05
sitebuilderLuc Pattyn6-Aug-09 8:05 
GeneralRe: Thread Sincronization Issue: Aborting thread with locked resources Pin
Leonardo Muzzi6-Aug-09 8:16
Leonardo Muzzi6-Aug-09 8:16 
GeneralRe: Thread Sincronization Issue: Aborting thread with locked resources Pin
Leonardo Muzzi6-Aug-09 8:32
Leonardo Muzzi6-Aug-09 8:32 
GeneralRe: Thread Sincronization Issue: Aborting thread with locked resources Pin
Luc Pattyn6-Aug-09 8:38
sitebuilderLuc Pattyn6-Aug-09 8:38 
GeneralRe: Thread Sincronization Issue: Aborting thread with locked resources Pin
Luc Pattyn6-Aug-09 8:35
sitebuilderLuc Pattyn6-Aug-09 8:35 
GeneralRe: Thread Sincronization Issue: Aborting thread with locked resources Pin
Leonardo Muzzi6-Aug-09 8:51
Leonardo Muzzi6-Aug-09 8:51 
GeneralRe: Thread Sincronization Issue: Aborting thread with locked resources Pin
Luc Pattyn6-Aug-09 9:00
sitebuilderLuc Pattyn6-Aug-09 9:00 
GeneralRe: Thread Sincronization Issue: Aborting thread with locked resources Pin
supercat97-Aug-09 7:58
supercat97-Aug-09 7:58 
"All catch/finally blocks are honored, and never aborted mid-stream..."

...but code which relies upon certain instructions not throwing exceptions may be broken if they do so. See the article's comments about 'using'. By the sound of it, using abort exceptions doesn't sound very safe. Using interrupt would seem much safer, provided that any time-consuming loops that don't engage in managed sleeping test a flag for whether they should exit.

The "using" directive is nice in many ways--it's too bad that there are so many wrinkles when using it. If a constructor could take a byRef parameter indicating where the new object should be stored, and if it could store the newly-created object there before leaving its outermost try/catch block, one could emulate a 'Using' in such a way as to avoid leaving dangling resources in case of an abort. Unfortunately, I don't know any way to make anything remotely like that work as smoothly as "using".

Too bad iDisposable seems to have been an afterthought (unlike Finalize, which is common to all objects). If Finalize took a parameter which indicated whether to perform a garbage-collect cleanup, explicit disposal, or failed-object-creation cleanup (objects that wanted to receive a garbage-collect cleanup would have to register) that would have simplified a lot of things.
QuestionGetting Error while accessing web service. Pin
Trupti Kadam5-Aug-09 23:24
Trupti Kadam5-Aug-09 23:24 
AnswerRe: Getting Error while accessing web service. Pin
Mark Salsbery6-Aug-09 6:50
Mark Salsbery6-Aug-09 6:50 
Questionconvert data in LINQ? Pin
Member 64596175-Aug-09 19:57
Member 64596175-Aug-09 19:57 
AnswerRe: convert data in LINQ? Pin
Toshiya TSURU5-Aug-09 20:23
Toshiya TSURU5-Aug-09 20:23 
AnswerRe: convert data in LINQ? Pin
Tamer Oz6-Aug-09 0:18
Tamer Oz6-Aug-09 0:18 
Questionrelease dates of WCF,AJAX,.. Pin
suni_dotnet5-Aug-09 7:03
suni_dotnet5-Aug-09 7:03 
AnswerRe: release dates of WCF,AJAX,.. Pin
Not Active5-Aug-09 9:12
mentorNot Active5-Aug-09 9:12 
QuestionFTP client unicode format Pin
akshata115-Aug-09 1:32
akshata115-Aug-09 1:32 
QuestionVista style 'progress window' in .NET? Pin
pimb24-Aug-09 21:35
pimb24-Aug-09 21:35 
AnswerRe: Vista style 'progress window' in .NET? Pin
Henry Minute5-Aug-09 12:23
Henry Minute5-Aug-09 12:23 
GeneralRe: Vista style 'progress window' in .NET? Pin
pimb26-Aug-09 0:03
pimb26-Aug-09 0:03 
GeneralRe: Vista style 'progress window' in .NET? Pin
pimb26-Aug-09 1:58
pimb26-Aug-09 1:58 
GeneralRe: Vista style 'progress window' in .NET? Pin
Henry Minute6-Aug-09 2:14
Henry Minute6-Aug-09 2:14 
GeneralRe: Vista style 'progress window' in .NET? Pin
pimb26-Aug-09 2:38
pimb26-Aug-09 2:38 
GeneralRe: Vista style 'progress window' in .NET? Pin
Henry Minute6-Aug-09 2:43
Henry Minute6-Aug-09 2:43 
GeneralRe: Vista style 'progress window' in .NET? Pin
pimb26-Aug-09 2:47
pimb26-Aug-09 2:47 
GeneralRe: Vista style 'progress window' in .NET? Pin
pimb26-Aug-09 2:54
pimb26-Aug-09 2:54 

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.