Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated support for Thread.Interrupt() #555

Merged
merged 3 commits into from
Nov 23, 2021

Conversation

NightOwl888
Copy link
Contributor

Closes #526 and closes #544.

This PR just adds the [Ignore] attribute to the following tests and updates the IndexWriter and directory documentation to indicate that Thread.Interrupt() is not supported in Lucene.NET due to the high possibility that it could break a Commit() or cause a deadlock.

The code for Thread.Interrupt() still exists in the codebase and we won't remove it, but it is just a best effort. Due to the fact that any code that we don't own that uses lock () or Monitor.Enter() could throw System.Threading.ThreadInterruptedException in a part of the application where we don't expect it, it is not practical to support such a feature in .NET.

…interruptableMonitor: Ignore tests that call Thread.Interrupt(), as this is not supportable in .NET. Closes apache#544.
…ported in Lucene.NET due to the high likelihood it could break a Commit() or cause a deadlock. Closes apache#526.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant