如何使用 Carbon 卸载 WebDAV 卷而不需要很长的阻塞期?
我正在尝试使用 FSUnmountVolumeSync() 或 FSEjectVolumeSync() 卸载 WebDAV 卷(使用 FSMountServerVolumeSync() 安装)。 到目前为止,我无法让它们中的任何一个在不阻塞超过 20 秒的情况下可靠地卸载卷。 当他们阻止时,我可以看到 webdavfs_agent 在 Console.app 中抱怨 WebDAV 服务器没有响应。 不过,它们永远不会出错,而且 WebDAV 卷之后总是会被卸载。 就好像我错过了一步。
我的处理方式是否错误,或者这只是 OS X 的一个怪癖/错误? 至于这两种方法之间的差异或调用它们的先决条件,文档非常模糊。
I'm trying to unmount a WebDAV volume (mounted with FSMountServerVolumeSync()) using either FSUnmountVolumeSync() or FSEjectVolumeSync(). Thus far I've been unable to get either of them to reliably unmount the volume without blocking for more than 20 seconds. While they're blocking I can see webdavfs_agent complaining in Console.app that the WebDAV server is not responding. They never error out, though, and the WebDAV volume has always been unmounted afterward. It's as if I've missed a step.
Am I going about it the wrong way, or is this just an OS X quirk/bug? The documentation is pretty vague as far as what the differences between these two methods are, or any prerequisites to their being called.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试
FSEjectVolume
异步
。 当完成弹出卷时,这将调用您的函数。You could try
FSEjectVolume
Async
. This will call a function of yours back when it finishes ejecting the volume.