简体   繁体   English

什么是objectC中的单向布尔

[英]What is oneway Bool in objectC

In my software, it has a function as below 在我的软件中,它具有以下功能

- (oneway BOOL)saveDocument:(INJDocument *)document

I don't understand about oneway Bool . 我不了解oneway Bool Can you explain to me What is the meaning of "oneway Bool"?, when should we use it? 您能给我解释一下“单向布尔”是什么意思吗?何时使用?

oneway is used with the distributed objects API, which allows use of Objective-C objects between different threads or applications. oneway与分布式对象API一起使用,该API允许在不同线程或应用程序之间使用Objective-C对象。 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. 没有它,即使方法的返回类型为void,调用方也将阻塞。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM