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

Config可以是单例的,像NativePayService这类Service能否设置成单例的 #286

Open
ting4937 opened this issue Jun 28, 2024 · 1 comment

Comments

@ting4937
Copy link

您的功能请求与问题有关吗? 请描述您遇到的问题

我看文档里有提到Config可以设置成单例的以提高性能,像NativePayService这类Service能否设置成单例的,是否有线程安全方面的问题,如果设置成单例的是否对性能有提升

描述您想要的解决方案

明确下像NativePayService这类Service能否设置成单例的,并在文档中说明

您还有其他的方案吗?

No response

其他信息

No response

@ErkangXu
Copy link

底层的 OkHttpClient是线程安全的,用单例应该没问题

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

No branches or pull requests

2 participants