运行同一XPC服务的多个实例(NSXPCConnection) [英] Running multiple instances of the same XPC service (NSXPCConnection)

查看:1549
本文介绍了运行同一XPC服务的多个实例(NSXPCConnection)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用Foundation.framework( NSXPCConnection 等)中找到的XPC API运行同一XPC服务的多个实例? 文档无法提供有关此事的详细信息。

Is it possible to run multiple instances of the same XPC service using the XPC APIs found in Foundation.framework (NSXPCConnection, etc.)? The docs don't provide much insight on this matter.

EDIT :进行了快速测试,似乎只有一个服务实例正在运行,即使我创建了两个XPC连接。

EDIT: Did a quick test, and it seems like only one instance of the service is running even though I created two XPC connections. Is there any way to have it run another instance?

推荐答案

我相信XPC服务是专为一个实例而设计的实例每多个连接。可能,使用一个正在运行的可执行文件来管理命名管道更方便。因此,最有可能同时创建多个实例是不可能的。

I believe XPC services designed for one instance per multiple connections. Probably, it is more convenient to manage named pipes with one running executable. So, the most likely it is impossible to create multiple instances simultaneously.

这篇关于运行同一XPC服务的多个实例(NSXPCConnection)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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