简体   繁体   English

具有多进程的 WorkManager

[英]Workmanager with multiple-processes

Is there a way to enqueue work in work manager from multiple processes?有没有办法将工作管理器中的工作从多个进程排入队列? Right now I'm getting this message when I'm trying to do it from the "non-ui" process现在,当我尝试从“非用户界面”进程执行此操作时收到此消息

I/WM-GreedyScheduler: Ignoring schedule request in non-main process . I/WM-GreedyScheduler: Ignoring schedule request in non-main process

Work manager version I'm using is 2.4.0.我使用的工作管理器版本是 2.4.0。 I know there is 2.5.0-alpha2 right now, but I cannot use that in production我知道现在有 2.5.0-alpha2,但我不能在生产中使用它

WorkManager 2.5.0-alpha02 is the first version of WorkManager that has multi-process support. WorkManager 2.5.0-alpha02是第一个支持多进程的 WorkManager 版本。

There is no mechanism for using WorkManager across multiple processes in any previous version of WorkManager (hence why these new APIs were added in the first place) so you'll need to either upgrade to that version of WorkManager or wait for it to become beta/RC/stable.在任何以前版本的 WorkManager 中都没有在多个进程中使用 WorkManager 的机制(因此首先添加了这些新 API),因此您需要升级到该版本的 WorkManager 或等待它成为测试版/ RC/稳定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM