T
Tony Johansson
Hello!
Here is some docs about what is said about it.
Notifies a host that execution is about to enter a region of code in which
the effects of a thread abort or unhandled exception might jeopardize other
tasks in the application domain.
Used to notify the host that code to be executed cannot be aborted safely.
Aborting a thread between a BeginCriticalRegion and EndCriticalRegion might
leave an AppDomain in an unsafe state.
Now to my question as you know this BeginCriticalRegion/EndCriticalRegion
doesn't prevent an abort to occur between these two regions. So I can't
understand what is the point in having these two regions.
In theory is just said avoid interrupt a thread when executing between these
two regions.
//Tony
Here is some docs about what is said about it.
Notifies a host that execution is about to enter a region of code in which
the effects of a thread abort or unhandled exception might jeopardize other
tasks in the application domain.
Used to notify the host that code to be executed cannot be aborted safely.
Aborting a thread between a BeginCriticalRegion and EndCriticalRegion might
leave an AppDomain in an unsafe state.
Now to my question as you know this BeginCriticalRegion/EndCriticalRegion
doesn't prevent an abort to occur between these two regions. So I can't
understand what is the point in having these two regions.
In theory is just said avoid interrupt a thread when executing between these
two regions.
//Tony