• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [[NSFileManager alloc] init] considered thread-safe
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [[NSFileManager alloc] init] considered thread-safe


  • Subject: Re: [[NSFileManager alloc] init] considered thread-safe
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 4 May 2010 23:27:24 -0700

On May 4, 2010, at 22:32, Ken Ferry wrote:

> Jens is exactly right.
>
> If you are going to use the delegate, you must make your own instance of NSFileManager.  Clearly - if you did that with the shared manager, you and other threads would fight over it.
>
> NSFileManager is otherwise threadsafe.  There's an open bug to rev the docs.
>
> -Ken

Sorry if I'm being dense, but I seem to keep getting an ambiguous answer to the real question. :)

I'm not concerned with the issue of delegates. My question is whether a single (delegate-less) instance of NSFileManager can be used simultaneously from multiple threads, or whether each thread needs a separate instance to prevent conflicts but multiple instances don't conflict with each other though they share the filesystem. Both possibilities are a kind of thread safety.

I thought "thread-safe" meant the former. Jens and some historical commentary said the latter for NSFileManager. You just said "thread-safe", but I'm not sure *which* thread-safe you meant -- the former or the latter.


_______________________________________________

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

  • Follow-Ups:
    • Re: [[NSFileManager alloc] init] considered thread-safe
      • From: Ken Ferry <email@hidden>
References: 
 >[[NSFileManager alloc] init] considered thread-safe (From: Quincey Morris <email@hidden>)
 >Re: [[NSFileManager alloc] init] considered thread-safe (From: Jens Alfke <email@hidden>)
 >Re: [[NSFileManager alloc] init] considered thread-safe (From: Quincey Morris <email@hidden>)
 >Re: [[NSFileManager alloc] init] considered thread-safe (From: Ken Ferry <email@hidden>)

  • Prev by Date: Re: [[NSFileManager alloc] init] considered thread-safe
  • Next by Date: Re: [[NSFileManager alloc] init] considered thread-safe
  • Previous by thread: Re: [[NSFileManager alloc] init] considered thread-safe
  • Next by thread: Re: [[NSFileManager alloc] init] considered thread-safe
  • Index(es):
    • Date
    • Thread