You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2021/11/23 04:41:08 UTC
[GitHub] [lucenenet] NightOwl888 opened a new pull request #555: Deprecated support for Thread.Interrupt()
NightOwl888 opened a new pull request #555:
URL: https://github.com/apache/lucenenet/pull/555
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.
- [Lucene.Net.TestIndexWriter.TestThreadInterruptDeadlock()](https://github.com/apache/lucenenet/blob/54c9a76ea22a1451e899577b296d4a58382d6a76/src/Lucene.Net.Tests/Index/TestIndexWriter.cs#L1480)
- [Lucene.Net.TestIndexWriter.TestTwoThreadsInterruptDeadlock()](https://github.com/apache/lucenenet/blob/54c9a76ea22a1451e899577b296d4a58382d6a76/src/Lucene.Net.Tests/Index/TestIndexWriter.cs#L1521)
- [Lucene.Net.Support.Threading.TestUninterruptableMonitor.TestThreadInterrupt()](https://github.com/apache/lucenenet/blob/54c9a76ea22a1451e899577b296d4a58382d6a76/src/Lucene.Net.Tests/Support/Threading/TestUninterruptableMonitor.cs#L240)
- [Lucene.Net.Support.Threading.TestUninterruptableMonitor.TestTwoThreadsInterrupt()](https://github.com/apache/lucenenet/blob/54c9a76ea22a1451e899577b296d4a58382d6a76/src/Lucene.Net.Tests/Support/Threading/TestUninterruptableMonitor.cs#L273)
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] NightOwl888 merged pull request #555: Deprecated support for Thread.Interrupt()
Posted by GitBox <gi...@apache.org>.
NightOwl888 merged pull request #555:
URL: https://github.com/apache/lucenenet/pull/555
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org