idisfkj / android-startup

🔥The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.
https://rousetime.com
Apache License 2.0
1.6k stars 158 forks source link

延迟初始化的小疑问 #26

Closed trycatchx closed 2 years ago

trycatchx commented 2 years ago

能否支持延迟初始化?

如果支持: 假设 A 延迟初始化, B 依赖了 A ,( A, B 都必须运行在主线程) 那么 B 会等到 A 延迟初始化完毕 ,B 才会执行吗?

idisfkj commented 2 years ago

虽然框架没有明确给出延迟初始化的API,但还是可以通过手动分发进行实现

具体可以查看onDispatch方法,手动通知依赖完成的场景

trycatchx commented 2 years ago

好的