Skip to content
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

调整BlockingRunner内部实现,移除同步代码块和 wait/notify 的使用;为部分配置类增加直接配置 Executor 的API #743

Merged
merged 4 commits into from
Sep 24, 2023

Conversation

ForliyScarlet
Copy link
Member

@ForliyScarlet ForliyScarlet commented Sep 24, 2023

  1. 调整BlockingRunner内部实现并移除同步代码块和 wait/notify,
    主要用于提供对JDK21虚拟线程的支持。

    现在可以通过增加JVM参数 -Dsimbot.runInBlocking.dispatcher=custom 并提供一个 CustomBlockingDispatcherProvider 的SPI实现,即可在 BlockingRunner 产生的阻塞API(xxxBlocking)中使用此自定义调度器。

  2. 为部分配置类增加直接配置 Executor 的API
    主要是 ApplicationConfigurationSimpleListenerManagerConfiguration 中,增加 appendExecutorToCoroutineContext 来快捷的提供一个调度器。

@ForliyScarlet ForliyScarlet added 优化 优化 特性 一个新特性,或者一个新的功能/能力 labels Sep 24, 2023
@github-actions
Copy link

Qodana for JVM

11 new problems were found

Inspection name Severity Problems
'Enum.values()' is recommended to be replaced by 'Enum.entries' since 1.9 🔶 Warning 2
Convert 'object' to 'data object' ◽️ Notice 9

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@ForteScarlet ForteScarlet merged commit d160256 into v3-dev Sep 24, 2023
4 checks passed
@ForteScarlet ForteScarlet deleted the dev/ref-blocking-runner branch September 25, 2023 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
优化 优化 特性 一个新特性,或者一个新的功能/能力
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants