Running simultaneous operations in Mailcore2

偶尔善良 提交于 2019-12-25 04:47:05

问题


Is it possible to run multiple operations simultaneously? I'm downloading emails in the background through an operation. When my users open an email to view it I start another operation to get the message - this doesn't run until the downloading operations are complete.


回答1:


You can adjust the property allowsFolderConcurrentAccessEnabled if you think you're always be on a server that supports it. Additionally, when you fetch a message, you can use a urgent flag to tell if you need to fetch it as soon as possible. It will make operation run simultaneously.

- (MCOIMAPFetchContentOperation *) fetchMessageOperationWithFolder:(NSString *)folder
                                                               uid:(uint32_t)uid
                                                            urgent:(BOOL)urgent;


来源:https://stackoverflow.com/questions/27904639/running-simultaneous-operations-in-mailcore2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!