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

AppModuleApplication中的Thread.sleep(1000)是否能去除 #146

Open
zjxckangkang opened this issue Sep 29, 2024 · 3 comments
Open

AppModuleApplication中的Thread.sleep(1000)是否能去除 #146

zjxckangkang opened this issue Sep 29, 2024 · 3 comments

Comments

@zjxckangkang
Copy link

AppModuleApplication中的以下代码会导致启动速度变慢1秒

@Override
public void onCreate(@NonNull Application app) {
    try {
        Thread.sleep(1000);
    } catch (InterruptedException e) {
        // ignore
    }
    Router.addRouterListener(listener);
}
@xiaojinzi123
Copy link
Owner

这不是 Demo 中的吗?
对你真实使用有啥影响吗?

@zjxckangkang
Copy link
Author

启动速度会慢1秒钟,看起来去掉是没有影响的

@xiaojinzi123
Copy link
Owner

启动速度会慢1秒钟,看起来去掉是没有影响的

这是我的 Demo 代码呀. 你项目中用的版本是没有这部分 Demo 代码的
所以我不太理解一定要去掉做啥, 我当时是为了测试一些场景才写的. 对别人项目中使用没有影响呀

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