GenericFutureListener.operationComplete(Future)直接由 一个I / O线程
我阅读了netty 4.1.22的最终源代码。看来GenericFutureListener.operationComplete可以在调用addListeners()的线程(非IO线程)中执行 事件结束后,但尚未调用侦听器。
public String superDigit(String s, int n) {
Integer newString = 0;
//just in case the string is really really long
for(int i = 0; i <= n ; ++i) {
newString = valueOf(s, 10); //<-- this line has an error (stated above)
setOutput(Integer.toString(firstOutput(newString)));
}
return s;
}
答案 0 :(得分:0)
它将始终由用于创建EventExecutor
的{{1}}执行。 DefaultPromise
是EventLoop
的子类型,大多数时候都用来创建这样的EventExecutor
。