Add tests for thread interrupt in finally blocks#15187
Add tests for thread interrupt in finally blocks#15187kouvel merged 2 commits intodotnet:masterfrom kouvel:InterruptInFinallyFx
Conversation
|
Needs CoreCLR PR to be merged and packages updated before this can be merged. |
| // does not allow thread interrupt in a finally block. There is nothing special about thread interrupt that requires | ||
| // not allowing it in finally blocks, so this behavior has changed in .NET Core. | ||
| var continueThread = new AutoResetEvent(false); | ||
| Action waitForThread; |
|
@kouvel Could you please resolve the merge conflict? I have just merged CoreCLR update so this should pass now. |
|
It looks like it hasn't picked up the updated CoreCLR yet, the test is passing against latest CoreCLR locally but failing with the CoreCLR package CoreFX is currently using |
|
@dotnet-bot test this please |
|
Is there a good alternative method to guard an section against a thread abort? |
|
Thread abort is not supported by .NET Core |
Wrapping the code by finally block still works fine for runtimes that support thread abort. It is no-op for .NET Core. |
|
@dotnet-bot test this please (now that #15219 has been fixed) |
Add tests for thread interrupt in finally blocks Related to dotnet/coreclrdotnet/corefx#8953 Commit migrated from dotnet/corefx@ebad9db
Related to dotnet/coreclr#8953