Skip to content

fix: 优化字典的并行执行和树结构转换 #321

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

Merged
merged 26 commits into from
May 19, 2025

Conversation

kyouji
Copy link
Contributor

@kyouji kyouji commented May 19, 2025

No description provided.

.map(resource -> {
try {
// 在每个任务中设置一致的类加载器
Thread.currentThread().setContextClassLoader(classLoaderSupplier.get());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里会不会再次跨线程?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个不是并行吧。但这里必须单独设置一次才能生效

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那应该就是跨了?直接for循环处理为List好了。。。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可能这里才是根本的原因?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只改里面的不行,要把parallelStream方法也改为for循环才行。

@zhou-hao zhou-hao merged commit 4e9344b into hs-web:master May 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants