dweiss commented on issue #13116: URL: https://github.com/apache/lucene/issues/13116#issuecomment-1980731011
I am not familiar with this code but there are many options to choose from. A Callable<Void> (this throws an Exception), Lucene's IOConsumer<Void>, adding an IORunnable similar to IOConsumer, IOFunction or IOSupplier we already have.. I would opt for an IORunnable, if it's something used only there. An IOCallable could look like this: ``` interface IOCallable<T> extends Callable<T> { @Override public T call() throws IOException; } ``` narrowing the type of exceptions thrown to only IOException and keeping an option to return something from the inside, at the same time allowing submission of such blocks to plain Java concurrent infrastructure? Just a thought. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org