-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
线程池中出现数据丢失或数据重用的情况 #349
Labels
Comments
找到了问题的原因,在于没有使用装饰后的线程池对象,而是使用了旧的对象。 @Before
public void init() {
//executorService1 = eventBusExecutor();
//TtlExecutors.getTtlExecutor(executorService1);
executorService1 = TtlExecutors.getTtlExecutor(eventBusExecutor());
} 建议在文档中显著表明一下。:wink: |
oldratlee
added a commit
that referenced
this issue
Jun 30, 2022
…iendly: trigger `IDE` warning if discard `wrapper` result #349
@HuangDayu 加了一个代码优化: a545558,发布在 上面错误的使用方式,在 之前的 |
oldratlee
added a commit
that referenced
this issue
Jul 1, 2022
…iendly: trigger `IDE` warning if discard `wrapper` result #349
oldratlee
added a commit
that referenced
this issue
Jul 1, 2022
…iendly: trigger `IDE` warning if discard `wrapper` result #349
oldratlee
added a commit
that referenced
this issue
Jul 4, 2022
…iendly: trigger `IDE` warning if discard `wrapper` result #349
oldratlee
added a commit
that referenced
this issue
Jul 4, 2022
…iendly: trigger `IDE` warning if discard `wrapper` result #349
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好,使用场景是这样的。业务上存在一个或者多个线程池,每一个线程池的任务会创建新的线程任务,任务可能是跨线程池的,也可能是在同一个线程池中。问题是出现了数据丢失或者旧数据重用的情况,在任务多的情况下出现的更加频繁。
这个输出结果:
可以看到,第0次和第1次的数据被重用了,而第8次和第9次的数据则丢失了。
这一次结果也可以看到,第0次和第1次的数据交叉重用,而第8次和第9次的数据也丢失了。
这似乎是一个必现的问题,是不是我没有手动remove的问题,还是使用的方式存在问题,请赐教,谢谢。
The text was updated successfully, but these errors were encountered: