Re: Thread safty audit & +initialize ?
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