-
Notifications
You must be signed in to change notification settings - Fork 935
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
Exception handler for context aware data structure #5164
base: main
Are you sure you want to change the base?
Exception handler for context aware data structure #5164
Conversation
I have two questions. I would appreciate it if you could provide your opinions. 🙇 I have a concern about makeContextAware(ExecutorService). We cannot know in advance which functions will be submitted to the ExecutorService instance. Therefore, I believe the type of the exception handler also has to be Function<Throwable, Object>. This, in my opinion, limits the use of the type system and can easily lead to runtime errors. So, for the case of makeContextAware(ExecutorService), instead of separately passing an exception handler as a parameter, I considered adding submit(Callable, Function<Throwable, T>) to ContextAwareExecutorService interface. I would like to know the opinions on this situation. I deliberately did not add exception handler accessor methods to context-aware classes. Is it necessary? @Nullable
Consumer<Throwable> exceptionHandler() {
return exceptionHandler;
} |
🔍 Build Scan® (commit: d4e9ec0)
|
I think it's out of this pull request's scope to specify exceptions thrown from executors.
By this reasoning, I don't think |
I am not sure if
I prefer adding only Note that exceptions raised by |
Motivation:
Modifications:
Result:
ContextAwareExecutor
#4879