
Signature
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
> Is there any method that I can guarantee execution of a code path within a
> thread without a Thread.Abort call interrupting it? I am concerned that a
[quoted text clipped - 4 lines]
> but
> I was not sure if this would be sufficient or not.
You need a Constrained Execution Region.
http://msdn2.microsoft.com/en-us/library/ms228973(d=ide).aspx
There's a lot of subtlety and a lot of restrictions on using them, but
they're intended to provide a solution to exactly the kind of problem you're
describing.
-cd
Greg Young - 31 Jul 2006 21:49 GMT
You can look at the safehandle class to see how this is done as well (I
believe it does just this).
Cheers,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
>> Is there any method that I can guarantee execution of a code path within
>> a
[quoted text clipped - 17 lines]
>
> -cd
Ken Varn - 01 Aug 2006 21:40 GMT
What about 1.1 framework?

Signature
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
> > Is there any method that I can guarantee execution of a code path within a
> > thread without a Thread.Abort call interrupting it? I am concerned that a
[quoted text clipped - 14 lines]
>
> -cd
> Is there any method that I can guarantee execution of a code path within a
> thread without a Thread.Abort call interrupting it?
The only option I know of is the BeginCriticalRegion stuff.
http://msdn2.microsoft.com/en-us/library/system.threading.thread.begincriticalre
gion.aspx
--
Chris Mullins
http://www.coversant.net/blogs/cmullins