Re: Asynchronously mounting a remote file server?
Re: Asynchronously mounting a remote file server?
- Subject: Re: Asynchronously mounting a remote file server?
- From: Mike Abdullah <email@hidden>
- Date: Fri, 14 Jun 2013 08:22:16 +0100
On 14 Jun 2013, at 06:40, Jens Alfke <email@hidden> wrote:
>
> On Jun 13, 2013, at 2:17 PM, Rick Mann <email@hidden> wrote:
>
>> I'd like to be smarter about this in my own apps. Is there a test I can perform before accessing aliases I've stored, or an async way to open/read from files that won't block the main thread?
>
> It’s not opening or reading from the file that’s the slow part, it’s resolving the alias, which happens first. (Aliases aren’t automatic or transparent like symlinks; something has to explicitly recognize a file as an alias and then resolve it to get the destination file’s location.)
>
> I know the alias APIs have changed in the last few years, and I don’t know the new ones, but I’d imagine there is an async variant. Once you’ve resolved the alias, you can open/read from the file as normal. If you think the actual file I/O might still be too slow, you can do it on a background thread.
There's no async API. I filed a radar asking for this relatively recently and was recommended to shove such tasks onto the low priority GCD queue instead.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden