GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [Suggestion] Improve robustness or documentation regarding exception handling in SingleThreadEventExecutor's task loop · Issue #16102 · netty/netty Open DescriptionNetty version4.1.x (Stable) / 5.0 (Alpha) OS / JVMAny DescriptionContext: The Potential Issue: Since Code Reference: protected final boolean runAllTasksFrom(Queue<Runnable> taskQueue) { // ... for (;;) { // If safeExecute is replaced by task.run() in a subclass without catch, // the thread dies upon exception. safeExecute(task); // ... } } Expected Behavior / Suggestion Since this behavior follows the "ExceptionNotCaught" pattern which is risky in concurrent programming: 1. Documentation: I suggest adding a strong Javadoc warning on runAllTasks, run, and confirmShutdown methods in SingleThreadEventExecutor. It should explicitly state that "Subclasses MUST catch all Throwables during task execution, otherwise the EventLoop thread will terminate." 2. Defensive Mechanism (Optional): Consider enforcing a UncaughtExceptionHandler for threads created by the EventLoopGroup that logs a strictly graded error message (e.g., "EventLoop thread died due to uncaught exception") to help users debug why their IO processing stopped silently. This is more of a usability/safety improvement suggestion than a functional bug in the default implementation. Reacted by JonJac Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |