On Fri, Jun 12, 2009 at 12:44 PM, Eric Schlegel<[email protected]> wrote: > > On Jun 12, 2009, at 7:14 AM, Adam R. Maxwell wrote: > >> There is also NSHost, which has -name and -names. > > However, be aware that [[NSHost currentHost] name] can block for an > exceedingly long time, so if you use it, always call it on a thread; and > some of other API recommended here, such as SCDynamicStoreCopyComputerName, > is probably a better choice.
NSHost is documented as not being thread safe, so you must never call it on a thread. You're right as well, of course, which means that the logical conclusion is that you must never use it at all, ever. Mike _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
