-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ISSUE #1122] support custom asyncThreadPool
#1194
Conversation
Hi @dragon-zhang, welcome to SOFAStack community, Please sign Contributor License Agreement! After you signed CLA, we will automatically sync the status of this pull request in 3 minutes. |
@dragon-zhang cla好啦,感谢贡献。 |
em...master的测试用例有些问题,这个PR只加了设置线程池的方法. |
Codecov Report
@@ Coverage Diff @@
## master #1194 +/- ##
============================================
- Coverage 71.58% 71.50% -0.08%
+ Complexity 830 827 -3
============================================
Files 408 408
Lines 17211 17213 +2
Branches 2682 2682
============================================
- Hits 12320 12309 -11
- Misses 3529 3540 +11
- Partials 1362 1364 +2
Continue to review full report at Codecov.
|
* @param asyncThreadPool callback用的线程池 | ||
*/ | ||
public static void setAsyncThreadPool(ThreadPoolExecutor asyncThreadPool) { | ||
AsyncRuntime.asyncThreadPool = asyncThreadPool; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to consider a more reasonable configuration for supporting asynchronous thread pool setups. The changes here do not guarantee thread safety and do not ensure that no other logic will have access to the thread pool created by the original logic before the set method is called. I hope to have a modified solution to discuss before putting it into development.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to consider a more reasonable configuration for supporting asynchronous thread pool setups. The changes here do not guarantee thread safety and do not ensure that no other logic will have access to the thread pool created by the original logic before the set method is called. I hope to have a modified solution to discuss before putting it into development.
sorry, I will follow the steps.
see #1122