NSOperation 存在于 NSOperationQueue 上
有谁知道一种方法来判断 NSOperation 是否已经在 NSOperationQueue 上,而无需实际获取操作列表并与每个项目进行比较?
提前致谢,
Does anyone know a way of telling if an NSOperation is already on a NSOperationQueue without having to actually get the list of operations and compare with each of the items?
Thanks in advance,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你必须拿到这份清单,但这并不那么费力。如果
queue
和operation
是您的对象:[[queue actions] containsObject:operation];
You have to get the list, but it's not that taxing. If
queue
andoperation
are your objects:[[queue operations] containsObject:operation];