Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Objective-C Basics (Retired) Advanced Objective-C Categories

Jared Watkins
Jared Watkins
10,756 Points


So what is nonatomic? Doug said it has to do with 'threading' so does that mean it's related to processing or the CPU?

1 Answer

Stone Preston
Stone Preston
42,016 Points

if you specify atomic (the default) only one thread can access the property at a time. nonatomic means multiple threads can access the property at the same time. Nonatomic is faster than atomic, however atomic is safer since you dont get two threads writing to the same property at the same time. it really only comes in to play when you are using multithreading. (most of the time you will just use nonatomic since its quick and if you arent writing multithreaded apps you dont have to worry about multiple threads accessing the same property)