Re: "Use them from only one thread at a time"
Re: "Use them from only one thread at a time"
- Subject: Re: "Use them from only one thread at a time"
- From: Jeff Kelley <email@hidden>
- Date: Thu, 19 May 2011 16:29:06 -0400
While that’s true for some classes (NSManagedObjectContext springs to mind)
I think a more general way to say it would be “In most cases, although you
can allocate instances of these classes on any thread, refrain from
messaging an instance from more than one thread simultaneously.”
Jeff Kelley
On Thu, May 19, 2011 at 4:22 PM, Jerry Krinock <email@hidden> wrote:
> From the Apple's "Threading Programming Guide"…
>
> "Thread-Unsafe Classes. The following classes and functions are generally
> not thread-safe. In most cases, you can use these classes from any thread as
> long as you use them from only one thread at a time."
>
> I'm confused by the second sentence. Would it be correct to restate it
> like this…
>
> "In most cases, although you can allocate instances of these classes on any
> thread, each instance must receive messages only from the thread which
> allocated it."
>
> ?
>
> Thanks,
>
> Jerry Krinock
_______________________________________________
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