• 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: [NSImageView setImage:theImage] Thread safe??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSImageView setImage:theImage] Thread safe??


  • Subject: Re: [NSImageView setImage:theImage] Thread safe??
  • From: Trygve Inda <email@hidden>
  • Date: Wed, 01 Jul 2009 23:48:20 +0000
  • Thread-topic: [NSImageView setImage:theImage] Thread safe??

> 2009/7/1 Trygve Inda <email@hidden>:
>> So is this legal in a secondary thread?
>>
>> NSImage* theImage = [[NSImage alloc] initWithContentsOfFile:someImagePath];
>> [imageView setImage:theImage];
>> [theImage release];
>
> No.


> I have no idea how this squares with "generally thread-safe", but when
> in doubt, assume it's not.
>
> Since -[NSImage setImage:] is nowhere documented to be thread safe
> that I can see, you must assume that it's not.

Thanks. I guess I drew too much into "generally thread-safe"... I guess
rocks generally float at 1 Infinite Loop, except when they don't.  :-)

Trygve


_______________________________________________

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

References: 
 >Re: [NSImageView setImage:theImage] Thread safe?? (From: Michael Ash <email@hidden>)

  • Prev by Date: Re: Only allowing a file to be opened by one app
  • Next by Date: Inconsistent "double-click to edit" in NSTableView
  • Previous by thread: Re: [NSImageView setImage:theImage] Thread safe??
  • Next by thread: Alternative to NSGraphicsContext graphicsContextWithGraphicsPort:flipped:
  • Index(es):
    • Date
    • Thread