在Mailcore2中运行同时操作 [英] Running simultaneous operations in Mailcore2

查看:85
本文介绍了在Mailcore2中运行同时操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以同时运行多个操作?我正在通过操作在后台下载电子邮件.当我的用户打开一封电子邮件进行查看时,我将开始另一项操作以获取消息-该操作要等到下载操作完成后才能运行.

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.

推荐答案

如果您认为始终位于支持该属性的服务器上,则可以调整属性allowsFolderConcurrentAccessEnabled. 此外,在获取消息时,可以使用urgent标志来告知是否需要尽快获取消息.它将使操作同时运行.

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;

这篇关于在Mailcore2中运行同时操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆