Skip to content

Instantly share code, notes, and snippets.

@develar
Created August 21, 2013 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save develar/6292573 to your computer and use it in GitHub Desktop.
Save develar/6292573 to your computer and use it in GitHub Desktop.
Index: common/src/main/java/io/netty/util/concurrent/ThreadPerTaskExecutor.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- common/src/main/java/io/netty/util/concurrent/ThreadPerTaskExecutor.java (revision 9176cea8fc664a4d63df794d44a84fc09cc2d6fd)
+++ common/src/main/java/io/netty/util/concurrent/ThreadPerTaskExecutor.java (revision )
@@ -19,7 +19,7 @@
import java.util.concurrent.ThreadFactory;
public final class ThreadPerTaskExecutor implements Executor {
- private final ThreadFactory threadFactory;
+ final ThreadFactory threadFactory;
public ThreadPerTaskExecutor(ThreadFactory threadFactory) {
if (threadFactory == null) {
Index: common/src/main/java/io/netty/util/concurrent/MultithreadEventExecutorGroup.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- common/src/main/java/io/netty/util/concurrent/MultithreadEventExecutorGroup.java (revision 9176cea8fc664a4d63df794d44a84fc09cc2d6fd)
+++ common/src/main/java/io/netty/util/concurrent/MultithreadEventExecutorGroup.java (revision )
@@ -142,7 +142,13 @@
* called for each thread that will serve this {@link MultithreadEventExecutorGroup}.
*
*/
- protected abstract EventExecutor newChild(Executor executor, Object... args) throws Exception;
+ protected EventExecutor newChild(Executor executor, Object... args) throws Exception {
+ return newChild(((ThreadPerTaskExecutor) executor).threadFactory, args);
+ }
+
+ protected EventExecutor newChild(ThreadFactory threadFactory, Object... args) throws Exception {
+ throw new AbstractMethodError();
+ }
@Override
public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment