Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Enable thread interrupt in finally blocks, remove some invalid asserts #8953

Merged
merged 2 commits into from
Jan 14, 2017

Conversation

kouvel
Copy link

@kouvel kouvel commented Jan 14, 2017

See commit descriptions

Koundinya Veluri added 2 commits January 13, 2017 17:21
Thread abort was not allowed in finally blocks, but the same logic was being applied to thread interrupt as well. There is nothing special about thread interrupt that requires it to not work in finally blocks.
These cases are actually possible because Windows APIs are inconsistent in their behavior when invalid handles are concerned. Depending on the invalid handle's value, a multi-wait can error with ERROR_INVALID_HANDLE, and a single-wait on an invalid handle could return WAIT_TIMEOUT.
@kouvel
Copy link
Author

kouvel commented Jan 14, 2017

@jkotas @gkhanna79

@kouvel
Copy link
Author

kouvel commented Jan 14, 2017

Relevant to issue #8924

@jkotas
Copy link
Member

jkotas commented Jan 14, 2017

@dotnet-bot test Windows_NT x64 Release Priority 1 Build and Test please

@jkotas jkotas merged commit 496c33f into dotnet:master Jan 14, 2017
@kouvel kouvel deleted the InterruptInFinally branch January 14, 2017 12:42
kouvel pushed a commit to dotnet/corefx that referenced this pull request Jan 17, 2017
Add tests for thread interrupt in finally blocks

Related to dotnet/coreclr#8953
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Enable thread interrupt in finally blocks, remove some invalid asserts

Commit migrated from dotnet/coreclr@496c33f
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants