|
10 | 10 | import java.util.concurrent.TimeoutException; |
11 | 11 | import java.util.function.Consumer; |
12 | 12 |
|
| 13 | +import io.netty.channel.AbstractEventLoop; |
13 | 14 | import io.netty.channel.Channel; |
14 | 15 | import io.netty.channel.ChannelFuture; |
15 | 16 | import io.netty.channel.ChannelPromise; |
16 | 17 | import io.netty.channel.EventLoop; |
17 | 18 | import io.netty.channel.EventLoopGroup; |
| 19 | +import io.netty.util.concurrent.AbstractEventExecutor; |
18 | 20 | import io.netty.util.concurrent.EventExecutor; |
19 | 21 | import io.netty.util.concurrent.Future; |
20 | 22 | import io.netty.util.concurrent.ProgressivePromise; |
|
25 | 27 | * An abstract event loop implementation which delegates all calls to a given event loop, but proxies all calls which |
26 | 28 | * schedule something on the event loop to methods which decide what should happen to the scheduled task. |
27 | 29 | */ |
28 | | -final class NettyEventLoopProxy implements EventLoop { |
| 30 | +final class NettyEventLoopProxy extends AbstractEventLoop { |
29 | 31 |
|
30 | 32 | private static final Callable<?> EMPTY_CALLABLE = () -> null; |
31 | 33 | private static final Runnable EMPTY_RUNNABLE = () -> { |
@@ -236,6 +238,15 @@ public void execute(Runnable command) { |
236 | 238 | } |
237 | 239 | } |
238 | 240 |
|
| 241 | + // ShreddedPaper uses this method |
| 242 | + @Override |
| 243 | + public void lazyExecute(Runnable command) { |
| 244 | + Runnable proxied = this.proxyRunnable(command); |
| 245 | + if (proxied != null) { |
| 246 | + ((AbstractEventExecutor)this.delegate).lazyExecute(proxied); |
| 247 | + } |
| 248 | + } |
| 249 | + |
239 | 250 | @Override |
240 | 251 | public void forEach(Consumer<? super EventExecutor> action) { |
241 | 252 | this.delegate.forEach(action); |
|
0 commit comments