You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/02/17 06:58:47 UTC

[GitHub] [lucene-solr] dweiss commented on pull request #2378: LUCENE-9779: Hunspell: add an API to interrupt long computations

dweiss commented on pull request #2378:
URL: https://github.com/apache/lucene-solr/pull/2378#issuecomment-780350006


   Control-flow by exception is something I'm not particularly fond of, to be honest... I'd rather see a predicate (and graceful return) or leverage of existing Java mechanisms (Thread.checkInterrupted) to implement this. I realise a generic Runnable throwing an unchecked exception works in this case too (and is convenient for catching up the stack) but would you consider just resorting to checking the thread's interrupted status? The IDE can catch interrupted exception or wrap and rethrow as needed. 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org