单向修正目标c [英] oneway modifier objective c
本文介绍了单向修正目标c的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
a oneway
方法是异步的(结果不会立即出现) [1] oneway
与分布式对象API一起使用。 [2]
a oneway
method is asynchronous (the result is not immediately expected)[1]. oneway
is used with the distributed objects API. [2]
但我在 SCPlugin
+ (oneway void) executeShellCommandAsynchronously:(NSString*)command
{
[[self taskForShellCommand:command] launch];
return;
}
+ (void) refreshAllFinderItems
{
//code
if (cmd) {
[ShellTask executeShellCommandAsynchronously:cmd];
}
}
将 oneway
在可可应用程序(没有分布式对象)中表现相同?
will oneway
behave same in cocoa application(without distributed object)?
推荐答案
只是因为它不是分布式对象API的一部分,并不意味着它不会以同样的方式工作。关键字是一个编译器提示,没有多少其他。
Yes. Just because it isn't a part of the distributed objects API, does not mean it won't function in the same way. The keyword is a compiler hint, and not much else.
这篇关于单向修正目标c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文