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

Virtual thread compatible #489

Open
wants to merge 11 commits into
base: springboot3
Choose a base branch
from

Conversation

TheFatRatre
Copy link
Contributor

No description provided.

* @Create 2024/10/14 15:33
* @Version 1.0
*/
public class VirtualThreadExecutorAdapter implements ExecutorAdapter<ExecutorService>{
Copy link
Collaborator

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.

是指不实现ExecutorAdapter吗,感觉是属于adapter这个逻辑的。之前是想把ExecutorAdapter做一个重构,和yanhom哥聊过,说是目前不要改太多东西,重写的方法就空实现就好了

Copy link
Collaborator

@KamToHung KamToHung Oct 18, 2024

Choose a reason for hiding this comment

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

是指不实现ExecutorAdapter吗,感觉是属于adapter这个逻辑的。之前是想把ExecutorAdapter做一个重构,和yanhom哥聊过,说是目前不要改太多东西,重写的方法就空实现就好了

virtual thread是JDK21的,所以在想是否使用一个新模块来处理较好。不过简单来做应该也不用,做好版本判断

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是指不实现ExecutorAdapter吗,感觉是属于adapter这个逻辑的。之前是想把ExecutorAdapter做一个重构,和yanhom哥聊过,说是目前不要改太多东西,重写的方法就空实现就好了

virtual thread是JDK21的,所以在想是否使用一个新模块来处理较好。不过简单来做应该也不用,做好版本判断

确实感觉开个新模块会方便些,做重构的话也对以前的功能没有影响

Copy link
Collaborator

Choose a reason for hiding this comment

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

是指不实现ExecutorAdapter吗,感觉是属于adapter这个逻辑的。之前是想把ExecutorAdapter做一个重构,和yanhom哥聊过,说是目前不要改太多东西,重写的方法就空实现就好了

virtual thread是JDK21的,所以在想是否使用一个新模块来处理较好。不过简单来做应该也不用,做好版本判断

目前实现看也没依赖到jdk21的特性,还是基于ExecutorService体系来做的,放core也行

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是指不实现ExecutorAdapter吗,感觉是属于adapter这个逻辑的。之前是想把ExecutorAdapter做一个重构,和yanhom哥聊过,说是目前不要改太多东西,重写的方法就空实现就好了

virtual thread是JDK21的,所以在想是否使用一个新模块来处理较好。不过简单来做应该也不用,做好版本判断

目前实现看也没依赖到jdk21的特性,还是基于ExecutorService体系来做的,放core也行

adapter里有点东西如果不依赖jdk21应该会报错,我看看能不能改改吧

Copy link
Collaborator

@KamToHung KamToHung Oct 21, 2024

Choose a reason for hiding this comment

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

是指不实现ExecutorAdapter吗,感觉是属于adapter这个逻辑的。之前是想把ExecutorAdapter做一个重构,和yanhom哥聊过,说是目前不要改太多东西,重写的方法就空实现就好了

virtual thread是JDK21的,所以在想是否使用一个新模块来处理较好。不过简单来做应该也不用,做好版本判断

目前实现看也没依赖到jdk21的特性,还是基于ExecutorService体系来做的,放core也行

adapter里有点东西如果不依赖jdk21应该会报错,我看看能不能改改吧

有个VersionUtil工具类看看能不能处理下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是指不实现ExecutorAdapter吗,感觉是属于adapter这个逻辑的。之前是想把ExecutorAdapter做一个重构,和yanhom哥聊过,说是目前不要改太多东西,重写的方法就空实现就好了

virtual thread是JDK21的,所以在想是否使用一个新模块来处理较好。不过简单来做应该也不用,做好版本判断

目前实现看也没依赖到jdk21的特性,还是基于ExecutorService体系来做的,放core也行

adapter里有点东西如果不依赖jdk21应该会报错,我看看能不能改改吧

有个VersionUtil工具类看看能不能处理下

image
就是这里要直接调用jdk21的方法,我做了下重构,现在估计没啥问题了

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.

3 participants