• 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 safty audit & +initialize ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread safty audit & +initialize ?


  • Subject: Re: Thread safty audit & +initialize ?
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 25 Jul 2001 01:45:51 -0700

On Tuesday, July 24, 2001, at 11:10 PM, Brant Vasilieff wrote:

I'm almost done with my threading audit for one application, but I'm curious. Is it theoretically possible for a class initialization to get called twice by two threads?

Not only that, it's possible for +initialize to get called multiple times in a single-threaded app. Whenever I'm creating a shared instance, I *always* check before creating it.

-jcr

I almost had a psychic girlfriend, but she left me before we met. -- Steven Wright


  • Follow-Ups:
    • Re: Thread safty audit & +initialize ?
      • From: Brant Vasilieff <email@hidden>
References: 
 >Thread safty audit & +initialize ? (From: Brant Vasilieff <email@hidden>)

  • Prev by Date: Re: Objective-C++
  • Next by Date: iconForFile in a thread
  • Previous by thread: Thread safty audit & +initialize ?
  • Next by thread: Re: Thread safty audit & +initialize ?
  • Index(es):
    • Date
    • Thread