Re: Asynchronous compatibility of NSDocument read/write methods
Re: Asynchronous compatibility of NSDocument read/write methods
- Subject: Re: Asynchronous compatibility of NSDocument read/write methods
- From: Mike Abdullah <email@hidden>
- Date: Sun, 17 Apr 2016 10:20:45 +0200
Have you read any of the documentation? Your question sounds rather like you haven’t if I’m honest!
If using the asynchronous features of the document system, the read and writing methods are still called and execute synchronously, but on a worker thread. There are various APIs built into the doc system to coordinate everything around that.
Mike.
> On 17 Apr 2016, at 04:23, Daryle Walker <email@hidden> wrote:
>
> The NSDocument class has some core methods for you to override to read and write data from/to disk. Are those called from the main thread? If so, can you defer the actual work to an NSOperation or something? If you do so, what is your GUI supposed to do/show? Or will the window not be shown yet?
>
> —
> Daryle Walker
> Mac, Internet, and Video Game Junkie
> darylew AT mac DOT com
>
> _______________________________________________
>
> 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
_______________________________________________
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