Skip navigation.
 
mlRe: Leopard Properties and NSMutable Array
FROM : Jim Correia
DATE : Sun Jan 06 20:32:14 2008

On Jan 5, 2008, at 9:16 PM, Bill Bumgarner wrote:

> I should add, though, that the above is not really atomic (and, of 
> course, "atomic" is not thread safe -- merely non-crashy in the 
> face of the threads).
>
> (One of the advantages of GC is that simple setters like the above 
> become atomic in that assignments are atomic for object types.)


Can you offer any advice for the times when I must write my own 
accessor, but want it to have similar behaviors to the autogenerated 
accessor? In particular, I'm thinking about the default atomic 
behavior. Is this simply wrapping the work in a @synchronized(self) 
block? Something else?

I'd look in the objc-2 sources, but they aren't available yet :-)

Jim

Related mailsAuthorDate
mlLeopard Properties and NSMutable Array Jonathan Jan 6, 02:41
mlRe: Leopard Properties and NSMutable Array Bill Bumgarner Jan 6, 02:53
mlRe: Leopard Properties and NSMutable Array Jonathan Dann Jan 6, 03:13
mlRe: Leopard Properties and NSMutable Array Bill Bumgarner Jan 6, 03:16
mlRe: Leopard Properties and NSMutable Array André Pang Jan 6, 04:10
mlRe: Leopard Properties and NSMutable Array Bill Bumgarner Jan 6, 04:43
mlRe: Leopard Properties and NSMutable Array Scott Stevenson Jan 6, 04:49
mlLeopard Properties and 'non-nil' declaration André Pang Jan 6, 05:07
mlRe: Leopard Properties and 'non-nil' declaration Scott Stevenson Jan 6, 07:18
mlRe: Leopard Properties and 'non-nil' declaration André Pang Jan 6, 07:28
mlRe: Leopard Properties and 'non-nil' declaration Scott Anguish Jan 6, 08:33
mlRe: Leopard Properties and NSMutable Array Jonathan Dann Jan 6, 12:51
mlRe: Leopard Properties and NSMutable Array Jonathan Dann Jan 6, 15:55
mlRe: Leopard Properties and NSMutable Array Jonathan Dann Jan 6, 18:57
mlRe: Leopard Properties and NSMutable Array Bill Bumgarner Jan 6, 20:05
mlRe: Leopard Properties and NSMutable Array mmalc crawford Jan 6, 20:19
mlRe: Leopard Properties and NSMutable Array Bill Bumgarner Jan 6, 20:20
mlRe: Leopard Properties and NSMutable Array Jonathan Dann Jan 6, 20:32
mlRe: Leopard Properties and NSMutable Array Jim Correia Jan 6, 20:32
mlRe: Leopard Properties and NSMutable Array Bill Bumgarner Jan 13, 20:13