码迷,mamicode.com
首页 > 其他好文 > 详细

关于oneway void

时间:2015-07-19 09:59:43      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:

在 XCode 4.2 (with LLVM):里 

 
-(void)release 
 
{
 
}
 
 会弹出警告
 
 warning: Semantic Issue: Conflicting distributed object modifiers on return type in implementation of ‘release‘
 
 
 
为了去掉警告 修改如下 :
 
-(oneway void) release 
 
{
 
}
 
oneway is used with the distributed objects API, which allows use of objective-c objects between different threads or applications. It tells the system that it should not block the calling thread until the method returns. Without it, the caller will block, even though the method‘s return type is void. Obviously, it is never used with anything other than void, as doing so would mean the method returns something, but the caller doesn‘t get it. 

关于oneway void

标签:

原文地址:http://www.cnblogs.com/spiderdzl/p/4658163.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!