• 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: Thread-safe atomic property for array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread-safe atomic property for array


  • Subject: Re: Thread-safe atomic property for array
  • From: Mike Abdullah <email@hidden>
  • Date: Sat, 15 Aug 2015 13:36:02 +0100

> On 15 Aug 2015, at 13:21, Sandy McGuffog <email@hidden> wrote:
>
> What guarantees that the current autorelease cycle doesn’t end in the middle of this code?

If it does end in the middle of this code, that’s something the author of the code is doing specially and must deal with the consequences by themselves. Trying to protect against that in general is futile.
>
> Actually, as I think about it, technically, the [[hostObject myArray] retain] should be wrapped in some kind of lock mechanism itself to make it atomic….

Go back and read the question. The OP explicitly states that this is an atomic property, and they don’t care if the results are a bit out of date. No extra locking required.


_______________________________________________

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: Thread-safe atomic property for array
      • From: Sandy McGuffog <email@hidden>
References: 
 >Thread-safe atomic property for array (From: Trygve Inda <email@hidden>)
 >Re: Thread-safe atomic property for array (From: Mike Abdullah <email@hidden>)
 >Re: Thread-safe atomic property for array (From: Sandy McGuffog <email@hidden>)
 >Re: Thread-safe atomic property for array (From: Mike Abdullah <email@hidden>)
 >Re: Thread-safe atomic property for array (From: Sandy McGuffog <email@hidden>)

  • Prev by Date: Re: Thread-safe atomic property for array
  • Next by Date: Re: Thread-safe atomic property for array
  • Previous by thread: Re: Thread-safe atomic property for array
  • Next by thread: Re: Thread-safe atomic property for array
  • Index(es):
    • Date
    • Thread