• 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: Jens Alfke <email@hidden>
  • Date: Sat, 15 Aug 2015 10:32:38 -0700

> On Aug 15, 2015, at 6:50 AM, Sandy McGuffog <email@hidden> wrote:
>
> Well, in my experience, in multithreaded code, if you can’t guarantee that something won’t happen, sooner or later it will, so you better code around it. Murphy’s law is particularly strong as regards multithreading :)

Come on. We can _guarantee_ that the autorelease pool won’t be drained in the middle of that code snippet, simply because the snippet doesn’t include the end brace of an @autoreleasepool block in between getting the array and accessing it.

(You are aware that autorelease pools are per-thread, right?)

—Jens
_______________________________________________

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: 
 >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>)
 >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: Automatically activate next window after one is closed
  • 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